Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

regexp

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

regexp

Regex Parser

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
262
decreased by-7.42%
Maintainers
1
Weekly downloads
 
Created
Source

regexp

Regex parser based on descriptions in http://www.javascriptkit.com/javatutors/redev2.shtml

Build Status Dependency Status NPM version

Installation

npm install regexp

Usage

var regexp = require('regexp')
var res = regexp('[a-z]+')
assert.deepEqual(res, { type: 'match',
  offset: 0,
  text: '[a-z]+',
  body:
   [ { type: 'quantified',
       offset: 0,
       text: '[a-z]+',
       body:
        { type: 'charset',
          offset: 0,
          text: '[a-z]',
          invert: false,
          body:
           [ { type: 'range',
               offset: 1,
               text: 'a-z',
               start: 'a',
               end: 'z' } ] },
       quantifier:
        { type: 'quantifier',
          offset: 5,
          text: '+',
          min: 1,
          max: Infinity,
          greedy: true } } ] })

Contributing

To run tests:

$ npm install

$ npm test

This will also automatically compile index.js.

The key source files are src/grammer.pegjs which is compiled using pegjs and src/index.js which is a CommonJS module with a special additional pseudo import statement.

License

MIT

FAQs

Package last updated on 07 Aug 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc