positions.js 367 B

1234567891011121314151617
  1. var types = require('./types');
  2. exports.wordBoundary = function() {
  3. return { type: types.POSITION, value: 'b' };
  4. };
  5. exports.nonWordBoundary = function() {
  6. return { type: types.POSITION, value: 'B' };
  7. };
  8. exports.begin = function() {
  9. return { type: types.POSITION, value: '^' };
  10. };
  11. exports.end = function() {
  12. return { type: types.POSITION, value: '$' };
  13. };