baiji-meld
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -38,2 +38,3 @@ module.exports = { | ||
'padRight': require('./string/padEnd'), | ||
'escapeRegExp': require('./string/escapeRegExp'), | ||
@@ -40,0 +41,0 @@ // Collection Functions |
{ | ||
"name": "baiji-meld", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Baiji meld(Utils tools)", | ||
@@ -5,0 +5,0 @@ "main": "./lib/index.js", |
@@ -182,2 +182,7 @@ Meld | ||
``` | ||
- escapeRegExp | ||
Escape RegExp special characters. | ||
``` | ||
meld.escapeRegExp([string='']) | ||
``` | ||
@@ -184,0 +189,0 @@ ### Collection Functions |
@@ -61,2 +61,8 @@ var chai = require('chai'); | ||
describe('#escapeRegExp(string)', function() { | ||
it('should escape regexp special characters from string', function() { | ||
expect(meld.escapeRegExp('\\ ^ $ * + ? . ( ) | { } [ ]')).to.equal('\\\\ \\^ \\$ \\* \\+ \\? \\. \\( \\) \\| \\{ \\} \\[ \\]'); | ||
}); | ||
}); | ||
}); |
156472
176
4677
222