quote-scanner

Scanner quote postion for skip quote content

Usage no npm install needed!

<script type="module">
  import quoteScanner from 'https://cdn.skypack.dev/quote-scanner';
</script>

README

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)