From d5ee778ed167e78d59c590bf1463b5eb8c7e487c Mon Sep 17 00:00:00 2001 From: Denis Pushkarev Date: Thu, 19 Nov 2015 15:16:11 +0600 Subject: [PATCH] move `RegExp.escape` from `es7` to `core` namespace - rejected, close #116 --- build/build.ls | 2 +- build/index.js | 2 +- core/index.js | 1 + {es7 => core}/regexp.js | 2 +- es7/index.js | 1 - fn/regexp/escape.js | 2 +- fn/regexp/index.js | 2 +- index.js | 1 + library/core/index.js | 1 + library/{es7 => core}/regexp.js | 2 +- library/es7/index.js | 1 - library/fn/regexp/escape.js | 2 +- library/fn/regexp/index.js | 2 +- library/index.js | 1 + ...regexp.escape.js => core.regexp.escape.js} | 0 library/shim.js | 1 - ...regexp.escape.js => core.regexp.escape.js} | 0 shim.js | 1 - tests/commonjs.ls | 2 +- tests/es.js | 17 ---------- tests/library.js | 28 +++++++-------- ...regexp.escape.ls => core.regexp.escape.ls} | 2 +- tests/tests.js | 34 +++++++++---------- ...regexp.escape.ls => core.regexp.escape.ls} | 2 +- 24 files changed, 46 insertions(+), 63 deletions(-) rename {es7 => core}/regexp.js (55%) rename library/{es7 => core}/regexp.js (55%) rename library/modules/{es7.regexp.escape.js => core.regexp.escape.js} (100%) rename modules/{es7.regexp.escape.js => core.regexp.escape.js} (100%) rename tests/library/{es7.regexp.escape.ls => core.regexp.escape.ls} (95%) rename tests/tests/{es7.regexp.escape.ls => core.regexp.escape.ls} (96%) diff --git a/build/build.ls b/build/build.ls index 631923dd59bb..59817654c96a 100644 --- a/build/build.ls +++ b/build/build.ls @@ -119,7 +119,6 @@ list = <[ es7.string.pad-end es7.string.trim-left es7.string.trim-right - es7.regexp.escape es7.object.get-own-property-descriptors es7.object.values es7.object.entries @@ -140,6 +139,7 @@ list = <[ core.object.define core.object.make core.number.iterator + core.regexp.escape core.string.escape-html core.string.unescape-html core.log diff --git a/build/index.js b/build/index.js index 93c8447ca2fd..8e6be1eced1c 100644 --- a/build/index.js +++ b/build/index.js @@ -6,7 +6,7 @@ join = require('path').join; webpack = require('webpack'); temp = require('temp'); - list = ['es5', 'es6.symbol', 'es6.object.assign', 'es6.object.is', 'es6.object.set-prototype-of', 'es6.object.to-string', 'es6.object.freeze', 'es6.object.seal', 'es6.object.prevent-extensions', 'es6.object.is-frozen', 'es6.object.is-sealed', 'es6.object.is-extensible', 'es6.object.get-own-property-descriptor', 'es6.object.get-prototype-of', 'es6.object.keys', 'es6.object.get-own-property-names', 'es6.function.name', 'es6.function.has-instance', 'es6.number.constructor', 'es6.number.epsilon', 'es6.number.is-finite', 'es6.number.is-integer', 'es6.number.is-nan', 'es6.number.is-safe-integer', 'es6.number.max-safe-integer', 'es6.number.min-safe-integer', 'es6.number.parse-float', 'es6.number.parse-int', 'es6.math.acosh', 'es6.math.asinh', 'es6.math.atanh', 'es6.math.cbrt', 'es6.math.clz32', 'es6.math.cosh', 'es6.math.expm1', 'es6.math.fround', 'es6.math.hypot', 'es6.math.imul', 'es6.math.log10', 'es6.math.log1p', 'es6.math.log2', 'es6.math.sign', 'es6.math.sinh', 'es6.math.tanh', 'es6.math.trunc', 'es6.string.from-code-point', 'es6.string.raw', 'es6.string.trim', 'es6.string.code-point-at', 'es6.string.ends-with', 'es6.string.includes', 'es6.string.repeat', 'es6.string.starts-with', 'es6.string.iterator', 'es6.string.anchor', 'es6.string.big', 'es6.string.blink', 'es6.string.bold', 'es6.string.fixed', 'es6.string.fontcolor', 'es6.string.fontsize', 'es6.string.italics', 'es6.string.link', 'es6.string.small', 'es6.string.strike', 'es6.string.sub', 'es6.string.sup', 'es6.array.from', 'es6.array.of', 'es6.array.iterator', 'es6.array.species', 'es6.array.copy-within', 'es6.array.fill', 'es6.array.find', 'es6.array.find-index', 'es6.regexp.constructor', 'es6.regexp.flags', 'es6.regexp.match', 'es6.regexp.replace', 'es6.regexp.search', 'es6.regexp.split', 'es6.promise', 'es6.map', 'es6.set', 'es6.weak-map', 'es6.weak-set', 'es6.reflect.apply', 'es6.reflect.construct', 'es6.reflect.define-property', 'es6.reflect.delete-property', 'es6.reflect.enumerate', 'es6.reflect.get', 'es6.reflect.get-own-property-descriptor', 'es6.reflect.get-prototype-of', 'es6.reflect.has', 'es6.reflect.is-extensible', 'es6.reflect.own-keys', 'es6.reflect.prevent-extensions', 'es6.reflect.set', 'es6.reflect.set-prototype-of', 'es6.date.to-string', 'es6.typed.array-buffer', 'es6.typed.data-view', 'es6.typed.int8-array', 'es6.typed.uint8-array', 'es6.typed.uint8-clamped-array', 'es6.typed.int16-array', 'es6.typed.uint16-array', 'es6.typed.int32-array', 'es6.typed.uint32-array', 'es6.typed.float32-array', 'es6.typed.float64-array', 'es7.array.includes', 'es7.string.at', 'es7.string.pad-start', 'es7.string.pad-end', 'es7.string.trim-left', 'es7.string.trim-right', 'es7.regexp.escape', 'es7.object.get-own-property-descriptors', 'es7.object.values', 'es7.object.entries', 'es7.map.to-json', 'es7.set.to-json', 'es7.system.global', 'web.immediate', 'web.dom.iterable', 'web.timers', 'core.dict', 'core.get-iterator-method', 'core.get-iterator', 'core.is-iterable', 'core.delay', 'core.function.part', 'core.object.is-object', 'core.object.classof', 'core.object.define', 'core.object.make', 'core.number.iterator', 'core.string.escape-html', 'core.string.unescape-html', 'core.log', 'js.array.statics']; + list = ['es5', 'es6.symbol', 'es6.object.assign', 'es6.object.is', 'es6.object.set-prototype-of', 'es6.object.to-string', 'es6.object.freeze', 'es6.object.seal', 'es6.object.prevent-extensions', 'es6.object.is-frozen', 'es6.object.is-sealed', 'es6.object.is-extensible', 'es6.object.get-own-property-descriptor', 'es6.object.get-prototype-of', 'es6.object.keys', 'es6.object.get-own-property-names', 'es6.function.name', 'es6.function.has-instance', 'es6.number.constructor', 'es6.number.epsilon', 'es6.number.is-finite', 'es6.number.is-integer', 'es6.number.is-nan', 'es6.number.is-safe-integer', 'es6.number.max-safe-integer', 'es6.number.min-safe-integer', 'es6.number.parse-float', 'es6.number.parse-int', 'es6.math.acosh', 'es6.math.asinh', 'es6.math.atanh', 'es6.math.cbrt', 'es6.math.clz32', 'es6.math.cosh', 'es6.math.expm1', 'es6.math.fround', 'es6.math.hypot', 'es6.math.imul', 'es6.math.log10', 'es6.math.log1p', 'es6.math.log2', 'es6.math.sign', 'es6.math.sinh', 'es6.math.tanh', 'es6.math.trunc', 'es6.string.from-code-point', 'es6.string.raw', 'es6.string.trim', 'es6.string.code-point-at', 'es6.string.ends-with', 'es6.string.includes', 'es6.string.repeat', 'es6.string.starts-with', 'es6.string.iterator', 'es6.string.anchor', 'es6.string.big', 'es6.string.blink', 'es6.string.bold', 'es6.string.fixed', 'es6.string.fontcolor', 'es6.string.fontsize', 'es6.string.italics', 'es6.string.link', 'es6.string.small', 'es6.string.strike', 'es6.string.sub', 'es6.string.sup', 'es6.array.from', 'es6.array.of', 'es6.array.iterator', 'es6.array.species', 'es6.array.copy-within', 'es6.array.fill', 'es6.array.find', 'es6.array.find-index', 'es6.regexp.constructor', 'es6.regexp.flags', 'es6.regexp.match', 'es6.regexp.replace', 'es6.regexp.search', 'es6.regexp.split', 'es6.promise', 'es6.map', 'es6.set', 'es6.weak-map', 'es6.weak-set', 'es6.reflect.apply', 'es6.reflect.construct', 'es6.reflect.define-property', 'es6.reflect.delete-property', 'es6.reflect.enumerate', 'es6.reflect.get', 'es6.reflect.get-own-property-descriptor', 'es6.reflect.get-prototype-of', 'es6.reflect.has', 'es6.reflect.is-extensible', 'es6.reflect.own-keys', 'es6.reflect.prevent-extensions', 'es6.reflect.set', 'es6.reflect.set-prototype-of', 'es6.date.to-string', 'es6.typed.array-buffer', 'es6.typed.data-view', 'es6.typed.int8-array', 'es6.typed.uint8-array', 'es6.typed.uint8-clamped-array', 'es6.typed.int16-array', 'es6.typed.uint16-array', 'es6.typed.int32-array', 'es6.typed.uint32-array', 'es6.typed.float32-array', 'es6.typed.float64-array', 'es7.array.includes', 'es7.string.at', 'es7.string.pad-start', 'es7.string.pad-end', 'es7.string.trim-left', 'es7.string.trim-right', 'es7.object.get-own-property-descriptors', 'es7.object.values', 'es7.object.entries', 'es7.map.to-json', 'es7.set.to-json', 'es7.system.global', 'web.immediate', 'web.dom.iterable', 'web.timers', 'core.dict', 'core.get-iterator-method', 'core.get-iterator', 'core.is-iterable', 'core.delay', 'core.function.part', 'core.object.is-object', 'core.object.classof', 'core.object.define', 'core.object.make', 'core.number.iterator', 'core.regexp.escape', 'core.string.escape-html', 'core.string.unescape-html', 'core.log', 'js.array.statics']; experimental = ['es6.typed.array-buffer', 'es6.typed.data-view', 'es6.typed.int8-array', 'es6.typed.uint8-array', 'es6.typed.uint8-clamped-array', 'es6.typed.int16-array', 'es6.typed.uint16-array', 'es6.typed.int32-array', 'es6.typed.uint32-array', 'es6.typed.float32-array', 'es6.typed.float64-array', 'es7.system.global']; libraryBlacklist = ['es6.object.to-string', 'es6.function.name', 'es6.regexp.constructor', 'es6.regexp.flags', 'es6.regexp.match', 'es6.regexp.replace', 'es6.regexp.search', 'es6.regexp.split', 'es6.number.constructor', 'es6.date.to-string']; es5SpecialCase = ['es6.object.freeze', 'es6.object.seal', 'es6.object.prevent-extensions', 'es6.object.is-frozen', 'es6.object.is-sealed', 'es6.object.is-extensible', 'es6.string.trim']; diff --git a/core/index.js b/core/index.js index 3d50bdb63e0d..a6b777d37322 100644 --- a/core/index.js +++ b/core/index.js @@ -9,6 +9,7 @@ require('../modules/core.object.classof'); require('../modules/core.object.define'); require('../modules/core.object.make'); require('../modules/core.number.iterator'); +require('../modules/core.regexp.escape'); require('../modules/core.string.escape-html'); require('../modules/core.string.unescape-html'); require('../modules/core.log'); diff --git a/es7/regexp.js b/core/regexp.js similarity index 55% rename from es7/regexp.js rename to core/regexp.js index cb24f98bb1e8..d75e911ec50b 100644 --- a/es7/regexp.js +++ b/core/regexp.js @@ -1,2 +1,2 @@ -require('../modules/es7.regexp.escape'); +require('../modules/core.regexp.escape'); module.exports = require('../modules/$.core').RegExp; \ No newline at end of file diff --git a/es7/index.js b/es7/index.js index 0ff11ef67f78..17b928f8a233 100644 --- a/es7/index.js +++ b/es7/index.js @@ -4,7 +4,6 @@ require('../modules/es7.string.pad-start'); require('../modules/es7.string.pad-end'); require('../modules/es7.string.trim-left'); require('../modules/es7.string.trim-right'); -require('../modules/es7.regexp.escape'); require('../modules/es7.object.get-own-property-descriptors'); require('../modules/es7.object.values'); require('../modules/es7.object.entries'); diff --git a/fn/regexp/escape.js b/fn/regexp/escape.js index 0c8d06b4ce59..3ee365fbd732 100644 --- a/fn/regexp/escape.js +++ b/fn/regexp/escape.js @@ -1,2 +1,2 @@ -require('../../modules/es7.regexp.escape'); +require('../../modules/core.regexp.escape'); module.exports = require('../../modules/$.core').RegExp.escape; \ No newline at end of file diff --git a/fn/regexp/index.js b/fn/regexp/index.js index 7d905d67d304..02cbcd2422fb 100644 --- a/fn/regexp/index.js +++ b/fn/regexp/index.js @@ -4,5 +4,5 @@ require('../../modules/es6.regexp.match'); require('../../modules/es6.regexp.replace'); require('../../modules/es6.regexp.search'); require('../../modules/es6.regexp.split'); -require('../../modules/es7.regexp.escape'); +require('../../modules/core.regexp.escape'); module.exports = require('../../modules/$.core').RegExp; \ No newline at end of file diff --git a/index.js b/index.js index 9acb1b4ad209..6ccac2452659 100644 --- a/index.js +++ b/index.js @@ -10,6 +10,7 @@ require('./modules/core.object.classof'); require('./modules/core.object.define'); require('./modules/core.object.make'); require('./modules/core.number.iterator'); +require('./modules/core.regexp.escape'); require('./modules/core.string.escape-html'); require('./modules/core.string.unescape-html'); require('./modules/core.log'); diff --git a/library/core/index.js b/library/core/index.js index 3d50bdb63e0d..a6b777d37322 100644 --- a/library/core/index.js +++ b/library/core/index.js @@ -9,6 +9,7 @@ require('../modules/core.object.classof'); require('../modules/core.object.define'); require('../modules/core.object.make'); require('../modules/core.number.iterator'); +require('../modules/core.regexp.escape'); require('../modules/core.string.escape-html'); require('../modules/core.string.unescape-html'); require('../modules/core.log'); diff --git a/library/es7/regexp.js b/library/core/regexp.js similarity index 55% rename from library/es7/regexp.js rename to library/core/regexp.js index cb24f98bb1e8..d75e911ec50b 100644 --- a/library/es7/regexp.js +++ b/library/core/regexp.js @@ -1,2 +1,2 @@ -require('../modules/es7.regexp.escape'); +require('../modules/core.regexp.escape'); module.exports = require('../modules/$.core').RegExp; \ No newline at end of file diff --git a/library/es7/index.js b/library/es7/index.js index 0ff11ef67f78..17b928f8a233 100644 --- a/library/es7/index.js +++ b/library/es7/index.js @@ -4,7 +4,6 @@ require('../modules/es7.string.pad-start'); require('../modules/es7.string.pad-end'); require('../modules/es7.string.trim-left'); require('../modules/es7.string.trim-right'); -require('../modules/es7.regexp.escape'); require('../modules/es7.object.get-own-property-descriptors'); require('../modules/es7.object.values'); require('../modules/es7.object.entries'); diff --git a/library/fn/regexp/escape.js b/library/fn/regexp/escape.js index 0c8d06b4ce59..3ee365fbd732 100644 --- a/library/fn/regexp/escape.js +++ b/library/fn/regexp/escape.js @@ -1,2 +1,2 @@ -require('../../modules/es7.regexp.escape'); +require('../../modules/core.regexp.escape'); module.exports = require('../../modules/$.core').RegExp.escape; \ No newline at end of file diff --git a/library/fn/regexp/index.js b/library/fn/regexp/index.js index 7d905d67d304..02cbcd2422fb 100644 --- a/library/fn/regexp/index.js +++ b/library/fn/regexp/index.js @@ -4,5 +4,5 @@ require('../../modules/es6.regexp.match'); require('../../modules/es6.regexp.replace'); require('../../modules/es6.regexp.search'); require('../../modules/es6.regexp.split'); -require('../../modules/es7.regexp.escape'); +require('../../modules/core.regexp.escape'); module.exports = require('../../modules/$.core').RegExp; \ No newline at end of file diff --git a/library/index.js b/library/index.js index 9acb1b4ad209..6ccac2452659 100644 --- a/library/index.js +++ b/library/index.js @@ -10,6 +10,7 @@ require('./modules/core.object.classof'); require('./modules/core.object.define'); require('./modules/core.object.make'); require('./modules/core.number.iterator'); +require('./modules/core.regexp.escape'); require('./modules/core.string.escape-html'); require('./modules/core.string.unescape-html'); require('./modules/core.log'); diff --git a/library/modules/es7.regexp.escape.js b/library/modules/core.regexp.escape.js similarity index 100% rename from library/modules/es7.regexp.escape.js rename to library/modules/core.regexp.escape.js diff --git a/library/shim.js b/library/shim.js index 0bed5b4f3d0c..2429376cec70 100644 --- a/library/shim.js +++ b/library/shim.js @@ -91,7 +91,6 @@ require('./modules/es7.string.pad-start'); require('./modules/es7.string.pad-end'); require('./modules/es7.string.trim-left'); require('./modules/es7.string.trim-right'); -require('./modules/es7.regexp.escape'); require('./modules/es7.object.get-own-property-descriptors'); require('./modules/es7.object.values'); require('./modules/es7.object.entries'); diff --git a/modules/es7.regexp.escape.js b/modules/core.regexp.escape.js similarity index 100% rename from modules/es7.regexp.escape.js rename to modules/core.regexp.escape.js diff --git a/shim.js b/shim.js index 0bed5b4f3d0c..2429376cec70 100644 --- a/shim.js +++ b/shim.js @@ -91,7 +91,6 @@ require('./modules/es7.string.pad-start'); require('./modules/es7.string.pad-end'); require('./modules/es7.string.trim-left'); require('./modules/es7.string.trim-right'); -require('./modules/es7.regexp.escape'); require('./modules/es7.object.get-own-property-descriptors'); require('./modules/es7.object.values'); require('./modules/es7.object.entries'); diff --git a/tests/commonjs.ls b/tests/commonjs.ls index 8752e7c27ce1..68edfcfa63f0 100644 --- a/tests/commonjs.ls +++ b/tests/commonjs.ls @@ -174,7 +174,6 @@ for P in <[.. ../library]> ok \Map of require("#P/es6") ok \includes of require("#P/es7/array") ok \values of require("#P/es7/object") - ok \escape of require("#P/es7/regexp") ok \at of require("#P/es7/string") require("#P/es7/set") require("#P/es7/map") @@ -191,6 +190,7 @@ for P in <[.. ../library]> ok \part of require("#P/core/function") ok typeof require("#P/core/log") is \function ok \define of require("#P/core/object") + ok \escape of require("#P/core/regexp") ok \escapeHTML of require("#P/core/string") ok \Array of require("#P/core") console.log 'CommonJS - OK' diff --git a/tests/es.js b/tests/es.js index 212fbc4b029f..93d4788bdc7a 100644 --- a/tests/es.js +++ b/tests/es.js @@ -6486,23 +6486,6 @@ }); }).call(this); -// Generated by LiveScript 1.3.1 -(function(){ - var module, test; - module = QUnit.module, test = QUnit.test; - module('ES7'); - test('RegExp.escape', function(assert){ - var escape; - escape = RegExp.escape; - assert.isFunction(escape); - assert.arity(escape, 1); - assert.name(escape, 'escape'); - assert.looksNative(escape); - assert.strictEqual(escape('qwe asd'), 'qwe asd', "Don't change simple string"); - return assert.strictEqual(escape('\\[]{}()*+?.^$|'), '\\\\\\[\\]\\{\\}\\(\\)\\*\\+\\?\\.\\^\\$\\|', 'Escape all RegExp special chars'); - }); -}).call(this); - // Generated by LiveScript 1.3.1 (function(){ var module, test; diff --git a/tests/library.js b/tests/library.js index fa1a2b03c7be..48136a9bec8d 100644 --- a/tests/library.js +++ b/tests/library.js @@ -842,6 +842,20 @@ }); }).call(this); +// Generated by LiveScript 1.3.1 +(function(){ + var module, test; + module = QUnit.module, test = QUnit.test; + module('core-js'); + test('RegExp.escape', function(assert){ + var escape; + escape = core.RegExp.escape; + assert.isFunction(escape); + assert.strictEqual(escape('qwe asd'), 'qwe asd', "Don't change simple string"); + return assert.strictEqual(escape('\\[]{}()*+?.^$|'), '\\\\\\[\\]\\{\\}\\(\\)\\*\\+\\?\\.\\^\\$\\|', 'Escape all RegExp special chars'); + }); +}).call(this); + // Generated by LiveScript 1.3.1 (function(){ var module, test; @@ -5082,20 +5096,6 @@ }); }).call(this); -// Generated by LiveScript 1.3.1 -(function(){ - var module, test; - module = QUnit.module, test = QUnit.test; - module('ES7'); - test('RegExp.escape', function(assert){ - var escape; - escape = core.RegExp.escape; - assert.isFunction(escape); - assert.strictEqual(escape('qwe asd'), 'qwe asd', "Don't change simple string"); - return assert.strictEqual(escape('\\[]{}()*+?.^$|'), '\\\\\\[\\]\\{\\}\\(\\)\\*\\+\\?\\.\\^\\$\\|', 'Escape all RegExp special chars'); - }); -}).call(this); - // Generated by LiveScript 1.3.1 (function(){ var module, test; diff --git a/tests/library/es7.regexp.escape.ls b/tests/library/core.regexp.escape.ls similarity index 95% rename from tests/library/es7.regexp.escape.ls rename to tests/library/core.regexp.escape.ls index cba42b13946d..67d4938dd036 100644 --- a/tests/library/es7.regexp.escape.ls +++ b/tests/library/core.regexp.escape.ls @@ -1,5 +1,5 @@ {module, test} = QUnit -module \ES7 +module \core-js test 'RegExp.escape' (assert)-> {escape} = core.RegExp diff --git a/tests/tests.js b/tests/tests.js index e2732087fc37..45bc75e1b84b 100644 --- a/tests/tests.js +++ b/tests/tests.js @@ -847,6 +847,23 @@ }); }).call(this); +// Generated by LiveScript 1.3.1 +(function(){ + var module, test; + module = QUnit.module, test = QUnit.test; + module('core-js'); + test('RegExp.escape', function(assert){ + var escape; + escape = RegExp.escape; + assert.isFunction(escape); + assert.arity(escape, 1); + assert.name(escape, 'escape'); + assert.looksNative(escape); + assert.strictEqual(escape('qwe asd'), 'qwe asd', "Don't change simple string"); + return assert.strictEqual(escape('\\[]{}()*+?.^$|'), '\\\\\\[\\]\\{\\}\\(\\)\\*\\+\\?\\.\\^\\$\\|', 'Escape all RegExp special chars'); + }); +}).call(this); + // Generated by LiveScript 1.3.1 (function(){ var module, test; @@ -7367,23 +7384,6 @@ }); }).call(this); -// Generated by LiveScript 1.3.1 -(function(){ - var module, test; - module = QUnit.module, test = QUnit.test; - module('ES7'); - test('RegExp.escape', function(assert){ - var escape; - escape = RegExp.escape; - assert.isFunction(escape); - assert.arity(escape, 1); - assert.name(escape, 'escape'); - assert.looksNative(escape); - assert.strictEqual(escape('qwe asd'), 'qwe asd', "Don't change simple string"); - return assert.strictEqual(escape('\\[]{}()*+?.^$|'), '\\\\\\[\\]\\{\\}\\(\\)\\*\\+\\?\\.\\^\\$\\|', 'Escape all RegExp special chars'); - }); -}).call(this); - // Generated by LiveScript 1.3.1 (function(){ var module, test; diff --git a/tests/tests/es7.regexp.escape.ls b/tests/tests/core.regexp.escape.ls similarity index 96% rename from tests/tests/es7.regexp.escape.ls rename to tests/tests/core.regexp.escape.ls index 7c1bcd6ad1c8..b5f930bf12fa 100644 --- a/tests/tests/es7.regexp.escape.ls +++ b/tests/tests/core.regexp.escape.ls @@ -1,5 +1,5 @@ {module, test} = QUnit -module \ES7 +module \core-js test 'RegExp.escape' (assert)-> {escape} = RegExp