Comparing version 1.1.9 to 1.1.10
25
index.js
@@ -64,3 +64,3 @@ var through = require('through3') | ||
* @function deserialize | ||
* @param {Object} stream input stream. | ||
* @param {Object} [stream] input stream. | ||
* @param {Function} [cb] callback function. | ||
@@ -71,9 +71,22 @@ * | ||
function deserialize(stream, cb) { | ||
var deserializer = new Deserialize(); | ||
stream | ||
.pipe(new LineStream()) | ||
.pipe(new EachStream()) | ||
.pipe(new Parser()) | ||
var deserializer = new Deserialize() | ||
, lines = new LineStream() | ||
, each = new EachStream() | ||
, parser = new Parser(); | ||
lines | ||
.pipe(each) | ||
.pipe(parser) | ||
.pipe(deserializer); | ||
if(stream) { | ||
stream.pipe(lines); | ||
} | ||
//stream | ||
//.pipe(new LineStream()) | ||
//.pipe(new EachStream()) | ||
//.pipe(new Parser()) | ||
//.pipe(deserializer); | ||
if(cb) { | ||
@@ -80,0 +93,0 @@ deserializer |
@@ -84,3 +84,2 @@ var through = require('through3') | ||
}else if(!isMeta) { | ||
console.error('dropped node %s', chunk._type); | ||
@@ -87,0 +86,0 @@ console.error(chunk); |
@@ -26,2 +26,7 @@ var Node = require('commonmark/lib/node'); | ||
// static type check | ||
AstNode.is = function(node, type) { | ||
return node._type === type; | ||
} | ||
// commonmark types | ||
@@ -28,0 +33,0 @@ AstNode.DOCUMENT = 'document'; |
{ | ||
"name": "mkast", | ||
"version": "1.1.9", | ||
"version": "1.1.10", | ||
"description": "Commonmark AST transformer", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
23561
603