{"name":"verbal-expressions","description":"JavaScript Regular expressions made easy","version":"0.3.0","keywords":["regular expressions","regex"],"homepage":"https://github.com/VerbalExpressions/JSVerbalExpressions","devDependencies":{"eslint":"^2.5.1","eslint-config-airbnb":"^6.2.0","grunt":"^0.4.2","grunt-cli":"^1.2.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-qunit":"^1.0.1","grunt-contrib-uglify":"^1.0.1","grunt-eslint":"^18.0.0","grunt-jsdoc":"^1.1.0","grunt-sourcemap-localize":"^0.1.0"},"repository":{"type":"git","url":"git://github.com/VerbalExpressions/JSVerbalExpressions.git"},"bugs":{"url":"https://github.com/VerbalExpressions/JSVerbalExpressions/issues"},"main":"VerbalExpressions.js","license":"MIT","scripts":{"grunt":"grunt","test":"grunt test","test:verbose":"grunt test --verbose","build":"grunt build","docs":"grunt docs"},"types":"./typings/verbalexpression.d.ts","engines":{"node":">= 0.8.0"},"gitHead":"4ca6a51c72a1ca6409445c519321f7af16f7d436","_id":"verbal-expressions@0.3.0","_shasum":"492447babfe44dd89802633c4518052617d527b2","_from":".","_npmVersion":"3.10.5","_nodeVersion":"7.2.0","_npmUser":{"name":"verbalexpressions","email":"ionutvmi@gmail.com"},"dist":{"shasum":"492447babfe44dd89802633c4518052617d527b2","tarball":"http://registry-npm.ywwl.com/verbal-expressions/download/verbal-expressions-0.3.0.tgz","integrity":"sha512-/Phw1h1cn62Mi1/XcE9y17FZVruClUZ6lLFl/GAwHBzeQfY3986JpRlxVc4ymeiMnhfeJ2zgli3rtCINlCY2CQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDrwXAwp4tGFbsDTx84OyfBRXHZpqstCR6eZ7uZdBzUaQIhALrUFBVBm4uPSQ5JaWYk0CLAggeaZS0irHfH6uGr/3v9"}],"size":465978,"noattachment":false,"key":"/verbal-expressions/-/verbal-expressions-0.3.0.tgz"},"maintainers":[{"name":"verbalexpressions","email":"oleg.b.seletsky@gmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/verbal-expressions-0.3.0.tgz_1484413562909_0.8153877905569971"},"directories":{},"readme":"# VerbalExpressions\r\n\r\n[![Build Status](https://travis-ci.org/VerbalExpressions/JSVerbalExpressions.svg)](https://travis-ci.org/VerbalExpressions/JSVerbalExpressions)\r\n[![Latest Version](https://img.shields.io/npm/v/verbal-expressions.svg)](https://www.npmjs.com/package/verbal-expressions)\r\n[![jsDelivr](https://img.shields.io/badge/dynamic/json.svg?label=jsDelivr&url=https%3A%2F%2Fdata.jsdelivr.com%2Fv1%2Fpackage%2Fnpm%2Fverbal-expressions&query=%24..tags.latest&colorB=blue&prefix=v)](https://www.jsdelivr.com/package/npm/verbal-expressions)\r\n[![License](https://img.shields.io/github/license/VerbalExpressions/JSVerbalExpressions.svg)](LICENSE)\r\n\r\n## JavaScript Regular Expressions made easy\r\n\r\nVerbalExpressions is a JavaScript library that helps construct difficult regular expressions.\r\n\r\n## How to get started\r\n\r\n### In the browser\r\n\r\n```html\r\n<script src=\"VerbalExpressions.js\"></script>\r\n```\r\n\r\nOr use the [jsDelivr CDN](https://www.jsdelivr.com/package/npm/verbal-expressions).\r\n\r\n### On the server (node.js)\r\n\r\nInstall:\r\n\r\n```sh\r\nnpm install verbal-expressions\r\n```\r\n\r\nRequire:\r\n\r\n```js\r\nconst VerEx = require('verbal-expressions');\r\n```\r\n\r\nOr use ES6's `import`:\r\n\r\n```js\r\nimport VerEx from 'verbal-expressions';\r\n```\r\n\r\n## Running tests\r\n\r\n```sh\r\nnpm test\r\n```\r\n\r\n(or)\r\n\r\n```sh\r\nnpm run test:verbose\r\n```\r\n\r\n## Creating a minified version\r\n\r\n```sh\r\nnpm run build\r\n```\r\n\r\nThis will run [Babel](https://babeljs.io) on `VerbalExpressions.js` and output the result to `dist/verbalexpressions.js`. A minified version of the same will also be written to `dist/verbalexpressions.min.js`.\r\n\r\nA source map will also be created in `dist`, so you can use the original \"un-babelified\", unminified source file for debugging purposes.\r\n\r\n## API documentation\r\n\r\nYou can find the API documentation at [verbalexpressions.github.io/JSVerbalExpressions](https://verbalexpressions.github.io/JSVerbalExpressions). You can find the source code for the docs in [`docs`](docs/).\r\n\r\n## Examples\r\n\r\nHere are some simple examples to give an idea of how VerbalExpressions works:\r\n\r\n### Testing if we have a valid URL\r\n\r\n```js\r\n// Create an example of how to test for correctly formed URLs\r\nconst tester = VerEx()\r\n    .startOfLine()\r\n    .then('http')\r\n    .maybe('s')\r\n    .then('://')\r\n    .maybe('www.')\r\n    .anythingBut(' ')\r\n    .endOfLine();\r\n\r\n// Create an example URL\r\nconst testMe = 'https://www.google.com';\r\n\r\n// Use RegExp object's native test() function\r\nif (tester.test(testMe)) {\r\n    alert('We have a correct URL'); // This output will fire\r\n} else {\r\n    alert('The URL is incorrect');\r\n}\r\n\r\nconsole.log(tester); // Outputs the actual expression used: /^(http)(s)?(\\:\\/\\/)(www\\.)?([^\\ ]*)$/\r\n```\r\n\r\n### Replacing strings\r\n\r\n```js\r\n// Create a test string\r\nconst replaceMe = 'Replace bird with a duck';\r\n\r\n// Create an expression that seeks for word \"bird\"\r\nconst expression = VerEx().find('bird');\r\n\r\n// Execute the expression like a normal RegExp object\r\nconst result = expression.replace(replaceMe, 'duck');\r\n\r\n// Outputs \"Replace duck with a duck\"\r\nalert(result);\r\n```\r\n\r\n### Shorthand for string replace\r\n\r\n```js\r\nconst result = VerEx().find('red').replace('We have a red house', 'blue');\r\n\r\n// Outputs \"We have a blue house\"\r\nalert(result);\r\n```\r\n\r\n## Contributions\r\n\r\nPull requests are warmly welcome!\r\n\r\nClone the repo and fork:\r\n\r\n```sh\r\ngit clone https://github.com/VerbalExpressions/JSVerbalExpressions.git\r\n```\r\n\r\n### Style guide\r\n\r\nThe [Airbnb](https://github.com/airbnb/javascript) style guide is loosely used as a basis for creating clean and readable JavaScript code. Check [`.eslintrc`](.eslintrc).\r\n\r\nCheck out these slide decks for handy Github & git tips:\r\n\r\n- [Git and Github Secrets](https://zachholman.com/talk/git-github-secrets/)\r\n- [More Git and Github Secrets](https://zachholman.com/talk/more-git-and-github-secrets/)\r\n\r\n## Tools\r\n\r\n- https://verbalregex.com - it's a wrapper of JSVerbalExpressions; users can write down the code and compile to regex\r\n- https://jsbin.com/metukuzowi/edit?js,console - JSBin Playground\r\n\r\n## Other Implementations\r\n\r\nYou can see an up to date list of all ports on [VerbalExpressions.github.io](https://VerbalExpressions.github.io).\r\n\r\n- [Ruby](https://github.com/ryan-endacott/verbal_expressions)\r\n- [C#](https://github.com/VerbalExpressions/CSharpVerbalExpressions)\r\n- [Python](https://github.com/VerbalExpressions/PythonVerbalExpressions)\r\n- [Java](https://github.com/VerbalExpressions/JavaVerbalExpressions)\r\n- [Groovy](https://github.com/VerbalExpressions/GroovyVerbalExpressions)\r\n- [PHP](https://github.com/VerbalExpressions/PHPVerbalExpressions)\r\n- [Haskell](https://github.com/VerbalExpressions/HaskellVerbalExpressions)\r\n- [Haxe](https://github.com/VerbalExpressions/HaxeVerbalExpressions)\r\n- [C++](https://github.com/VerbalExpressions/CppVerbalExpressions)\r\n- [Objective-C](https://github.com/VerbalExpressions/ObjectiveCVerbalExpressions)\r\n- [Perl](https://github.com/VerbalExpressions/PerlVerbalExpressions)\r\n- [Swift](https://github.com/VerbalExpressions/SwiftVerbalExpressions)\r\n\r\nIf you would like to contribute another port (which would be awesome!), please [open an issue](https://github.com/VerbalExpressions/implementation/issues/new) specifying the language in the [VerbalExpressions/implementation repo](https://github.com/VerbalExpressions/implementation/issues). Please don't open PRs for other languages against this repo.\r\n","publish_time":1484413563564,"_cnpm_publish_time":1484413563564,"dist-tags":{"latest":"1.0.2"}}