1.0.0 • Published 9 years ago

quote-scanner v1.0.0

Weekly downloads
5
License
ISC
Repository
github
Last release
9 years ago

quote-scanner

Scanner quote postion for skip quote content

var QuoteScanner = require('quote-scanner');

install

npm install quote-scanner --save

test

mocha

API

QuoteScanner(str)

  • {string} str required
var qs = new QuoteScanner("a'b'c'd\\'d'");

pos

The postion of quote

// [{start: 1, end: 3 }, { start: 5, end: 10}]
qs.pos

isIn(index)

Check the postion is in string

  • {int} index required
    The start position of string
qs.isIn(3)
1.0.0

9 years ago