We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a9cc363 commit 4bc2bd5Copy full SHA for 4bc2bd5
lib/stream.js
@@ -1,7 +1,11 @@
1
'use strict';
2
3
-const extend = parser => {
+const mixinMethods = parser => {};
4
5
+function stream() {
6
+ mixinMethods(this);
7
+ this.stream = true;
8
+ return this
9
};
10
-module.exports = extend;
11
+module.exports = stream;
schemaparser.js
@@ -7,12 +7,6 @@ const extensions = {
stream: require('./lib/stream.js')
-Parser.prototype.extend = function(
- extensionName
12
-) {
13
- const extension = extensions[extensionName];
14
- extension(this);
15
- return this;
16
-};
+Object.assign(Parser.prototype, extensions);
17
18
module.exports = Parser;
0 commit comments