mdast-range
Advanced tools
Comparing version 0.4.2 to 0.4.3
@@ -8,2 +8,8 @@ --- | ||
0.4.3 / 2015-07-12 | ||
================== | ||
* Refactor to externalise utilities ([a2bf648](https://github.com/wooorm/mdast-range/commit/a2bf648)) | ||
* Remove peer-dependencies ([4d577e1](https://github.com/wooorm/mdast-range/commit/4d577e1)) | ||
0.4.2 / 2015-06-20 | ||
@@ -10,0 +16,0 @@ ================== |
25
index.js
'use strict'; | ||
/** | ||
* Visit. | ||
* | ||
* @param {Node} tree | ||
* @param {function(node)} callback | ||
/* | ||
* Dependencies. | ||
*/ | ||
function visit(tree, callback) { | ||
/** | ||
* Visit a single node. | ||
*/ | ||
function one(node) { | ||
callback(node); | ||
var children = node.children; | ||
var index = -1; | ||
var length = children ? children.length : 0; | ||
var visit = require('mdast-util-visit'); | ||
while (++index < length) { | ||
one(children[index]); | ||
} | ||
} | ||
one(tree); | ||
} | ||
/** | ||
@@ -29,0 +10,0 @@ * Calculate offsets for `lines`. |
{ | ||
"name": "mdast-range", | ||
"version": "0.4.2", | ||
"version": "0.4.3", | ||
"description": "Range information to mdast", | ||
@@ -13,2 +13,5 @@ "license": "MIT", | ||
], | ||
"dependencies": { | ||
"mdast-util-visit": "^0.1.1" | ||
}, | ||
"repository": { | ||
@@ -23,8 +26,5 @@ "type": "git", | ||
], | ||
"peerDependencies": { | ||
"mdast": ">=0.23.0" | ||
}, | ||
"devDependencies": { | ||
"browserify": "^10.0.0", | ||
"eslint": "^0.23.0", | ||
"eslint": "^0.24.0", | ||
"esmangle": "^1.0.0", | ||
@@ -34,6 +34,6 @@ "istanbul": "^0.3.0", | ||
"jscs-jsdoc": "^1.0.0", | ||
"mdast": "^0.23.0", | ||
"mdast": "^0.26.0", | ||
"mdast-github": "^0.3.0", | ||
"mdast-lint": "^0.2.0", | ||
"mdast-toc": "^0.4.1", | ||
"mdast-lint": "^0.4.0", | ||
"mdast-toc": "^0.5.1", | ||
"mdast-usage": "^0.3.0", | ||
@@ -56,5 +56,4 @@ "mdast-yaml-config": "^0.2.0", | ||
"build-md": "mdast . --output --quiet", | ||
"build": "npm run bundle && npm run build-md", | ||
"prepublish": "npm run build" | ||
"build": "npm run bundle && npm run build-md" | ||
} | ||
} |
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
16206
139
+ Addedmdast-util-visit@^0.1.1
+ Addedmdast-util-visit@0.1.1(transitive)
- Removedmdast@3.0.0(transitive)