unist-util-visit
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -1,5 +0,11 @@ | ||
<!--mdast setext--> | ||
<!--remark setext--> | ||
<!--lint disable no-multiple-toplevel-headings--> | ||
1.0.1 / 2016-02-09 | ||
================== | ||
* Replace `remark` with `mdast` ([`ac5d902`](https://github.com/wooorm/unist-util-visit/commit/ac5d902)) | ||
* Fix example in `readme.md` ([`876c0ec`](https://github.com/wooorm/unist-util-visit/commit/876c0ec)) | ||
1.0.0 / 2015-08-01 | ||
@@ -6,0 +12,0 @@ ================== |
{ | ||
"name": "unist-util-visit", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Utility to recursively walk over unist nodes", | ||
@@ -8,3 +8,3 @@ "license": "MIT", | ||
"unist", | ||
"mdast", | ||
"remark", | ||
"markdown", | ||
@@ -39,7 +39,7 @@ "retext", | ||
"jscs-jsdoc": "^1.0.0", | ||
"mdast": "^0.28.0", | ||
"mdast-comment-config": "^0.1.2", | ||
"mdast-github": "^0.3.0", | ||
"mdast-lint": "^0.4.0", | ||
"mocha": "^2.0.0" | ||
"mocha": "^2.0.0", | ||
"remark": "^3.2.3", | ||
"remark-comment-config": "^2.0.2", | ||
"remark-github": "^4.0.1", | ||
"remark-lint": "^2.3.1" | ||
}, | ||
@@ -57,5 +57,5 @@ "scripts": { | ||
"postbundle": "esmangle unist-util-visit.js > unist-util-visit.min.js", | ||
"build-md": "mdast . --quiet", | ||
"build-md": "remark . --quiet", | ||
"build": "npm run bundle && npm run build-md" | ||
} | ||
} |
# unist-util-visit [![Build Status](https://img.shields.io/travis/wooorm/unist-util-visit.svg)](https://travis-ci.org/wooorm/unist-util-visit) [![Coverage Status](https://img.shields.io/codecov/c/github/wooorm/unist-util-visit.svg)](https://codecov.io/github/wooorm/unist-util-visit?branch=master) | ||
[**Unist**](https://github.com/wooorm/unist) node visitor. Useful when working | ||
with [**mdast**](https://github.com/wooorm/mdast) or | ||
with [**remark**](https://github.com/wooorm/remark) or | ||
[**retext**](https://github.com/wooorm/retext). | ||
@@ -24,7 +24,9 @@ | ||
```js | ||
var mdast = require('mdast'); | ||
var remark = require('remark'); | ||
var visit = require('unist-util-visit'); | ||
mdast().use(function (ast) { | ||
visit(ast, 'text', console.log.bind(console)); | ||
remark().use(function () { | ||
return function (ast) { | ||
visit(ast, 'text', console.log.bind(console)); | ||
}; | ||
}).process('Some *emphasis*, **strongness**, and `code`.'); | ||
@@ -46,3 +48,3 @@ ``` | ||
### visit([node](https://github.com/wooorm/unist#unist-nodes)\[, type\], callback\[, reverse\]) | ||
### visit([node](https://github.com/wooorm/unist#unist-nodes)\[, type], callback\[, reverse]) | ||
@@ -49,0 +51,0 @@ > `visit` is synchronous. |
8253
76