Comparing version 0.1.10 to 0.1.11
@@ -19,4 +19,9 @@ var types = require('./types'); | ||
exports.strToChars = function(str) { | ||
var chars_regex = /(\[\\b\])|\\(?:u([A-F0-9]{4})|x([A-F0-9]{2})|(0?[0-7]{2})|c([@A-Z\[\\\]\^?])|([0tnvfr]))/g; | ||
str = str.replace(chars_regex, function(s, b, a16, b16, c8, dctrl, eslsh) { | ||
var chars_regex = /(\[\\b\])|(\\)?\\(?:u([A-F0-9]{4})|x([A-F0-9]{2})|(0?[0-7]{2})|c([@A-Z\[\\\]\^?])|([0tnvfr]))/g; | ||
str = str.replace(chars_regex, function(s, b, lbs, a16, b16, c8, dctrl, eslsh) { | ||
if (lbs) { | ||
return s; | ||
} | ||
var code = b ? 8 : | ||
@@ -23,0 +28,0 @@ a16 ? parseInt(a16, 16) : |
@@ -11,3 +11,3 @@ { | ||
], | ||
"version": "0.1.10", | ||
"version": "0.1.11", | ||
"repository": { | ||
@@ -26,3 +26,3 @@ "type": "git", | ||
"devDependencies": { | ||
"vows": "0.7.x" | ||
"vows": "*" | ||
}, | ||
@@ -29,0 +29,0 @@ "licenses": [ |
@@ -1,7 +0,9 @@ | ||
# Regular Expression Tokenizer [![Build Status](https://secure.travis-ci.org/fent/ret.js.png)](http://travis-ci.org/fent/ret.js) | ||
# Regular Expression Tokenizer | ||
Tokenizes strings that represent a regular expressions. | ||
[![Build Status](https://secure.travis-ci.org/fent/ret.js.png)](http://travis-ci.org/fent/ret.js) [![Dependency Status](https://gemnasium.com/fent/ret.js.svg)](https://gemnasium.com/fent/ret.js) | ||
# Usage | ||
```js | ||
@@ -30,2 +32,3 @@ var ret = require('ret'); | ||
# Token Types | ||
`ret.types` is a collection of the various token types exported by ret. | ||
@@ -129,2 +132,3 @@ | ||
## Errors | ||
ret.js will throw errors if given a string with an invalid regular expression. All possible errors are | ||
@@ -144,2 +148,3 @@ | ||
# Tests | ||
Tests are written with [vows](http://vowsjs.org/) | ||
@@ -152,2 +157,3 @@ | ||
# License | ||
MIT |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
38038
13
985
156