A html parser
npm install -S afeiship/next-html-parser --registry=https://registry.npm.taobao.org
api | params | description |
---|---|---|
parse | (html, options) | Parse to json based on himalaya |
import NxHtmlParser from 'next-html-parser';
// code goes here:
NxHtmlParser.parse('<div class="nx-html-parser">test <storng>storng text</storng> </div>', {
callback: function(index, item) {
item.index = index;
}
});