tokenize-htmltext

1.0.0 • Public • Published

tokenize-htmltext

Build Status NPM version

Tokenize an html string into a list of text tokens, it keeps reference to indexes in the original string.

Installation

$ npm install tokenize-text

Usage

var tokenizeHTML = require('tokenize-htmltext');
 
 
var tokens = tokenizeHTML('<b>hello</b> world');
 
/*
[ { value: 'hello', index: 3, offset: 5 },
  { value: ' world', index: 12, offset: 6 } ]
*/

Readme

Keywords

none

Package Sidebar

Install

npm i tokenize-htmltext

Weekly Downloads

28

Version

1.0.0

License

Apache-2.0

Last publish

Collaborators

  • samypesse