{"_id":"escape-delims","_rev":"73936","name":"escape-delims","description":"Escape and un-escape delimiters in templates. Tested with Lo-Dash, underscore and Handlebars syntax, but could be used with other template engines/syntaxes as well. This is similar to the process used by Yeoman on escaped templates in generators.","dist-tags":{"latest":"0.4.0"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"time":{"modified":"2021-06-03T10:24:06.000Z","created":"2014-07-07T19:49:30.962Z","0.4.0":"2014-11-11T21:15:13.233Z","0.3.0":"2014-09-14T10:36:06.149Z","0.2.0":"2014-08-11T04:05:35.192Z","0.1.1":"2014-07-07T19:53:48.653Z","0.1.0":"2014-07-07T19:49:30.962Z"},"users":{},"author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git://github.com/jonschlinkert/escape-delims.git"},"versions":{"0.4.0":{"name":"escape-delims","description":"Escape and un-escape delimiters in templates. Tested with Lo-Dash, underscore and Handlebars syntax, but could be used with other template engines/syntaxes as well. This is similar to the process used by Yeoman on escaped templates in generators.","version":"0.4.0","homepage":"https://github.com/jonschlinkert/escape-delims","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git://github.com/jonschlinkert/escape-delims.git"},"bugs":{"url":"https://github.com/jonschlinkert/escape-delims/issues"},"licenses":[{"type":"MIT","url":"https://github.com/jonschlinkert/escape-delims/blob/master/LICENSE-MIT"}],"keywords":["RegExp","assemble","atpl","cache","compile","consolidate","content","data","delimiters","delims","demlim","demlimiter","demlimiters","demlims","docs","documentation","dot","dust","dustjs-helpers","dustjs-linkedin","eco","ect","ejs","engine","engines","escape","escaping","express","expressions","front","generate","generator","gray-matter","haml-coffee","hamljs","handlebars","hogan.js","jade","jazz","jqtpl","liquor","lo-dash","lodash","markdown","matter","mocha","mote","mustache","noop","nunjucks","parse","parser","parsers","pass-through","process","qejs","ractive","re","regex","regular","render","should","swig","template","templates","templayed","toffee","transform","underscore","verb","view","walrus","whiskers","yaml"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha -R spec"},"devDependencies":{"mocha":"*","should":"^4.0.4"},"dependencies":{"delims":"^0.4.0","regexp-special-chars":"^0.1.0"},"_id":"escape-delims@0.4.0","_shasum":"eca7cd04506ed6033c12182958e345e2a391d548","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"eca7cd04506ed6033c12182958e345e2a391d548","size":4330,"noattachment":false,"key":"/escape-delims/-/escape-delims-0.4.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/escape-delims/download/escape-delims-0.4.0.tgz"},"directories":{},"publish_time":1415740513233,"_cnpm_publish_time":1415740513233,"_hasShrinkwrap":false},"0.3.0":{"name":"escape-delims","description":"Escape and un-escape delimiters in templates. Tested with Lo-Dash, underscore and Handlebars syntax, but could be used with other template engines/syntaxes as well. This is similar to the process used by Yeoman on escaped templates in generators.","version":"0.3.0","homepage":"https://github.com/jonschlinkert/escape-delims","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git://github.com/jonschlinkert/escape-delims.git"},"bugs":{"url":"https://github.com/jonschlinkert/escape-delims/issues"},"licenses":[{"type":"MIT","url":"https://github.com/jonschlinkert/escape-delims/blob/master/LICENSE-MIT"}],"keywords":["RegExp","assemble","atpl","cache","compile","consolidate","content","data","delimiters","delims","demlim","demlimiter","demlimiters","demlims","docs","documentation","dot","dust","dustjs-helpers","dustjs-linkedin","eco","ect","ejs","engine","engines","escape","escaping","express","expressions","front","generate","generator","gray-matter","haml-coffee","hamljs","handlebars","hogan.js","jade","jazz","jqtpl","liquor","lo-dash","lodash","markdown","matter","mocha","mote","mustache","noop","nunjucks","parse","parser","parsers","pass-through","process","qejs","ractive","re","regex","regular","render","should","swig","template","templates","templayed","toffee","transform","underscore","verb","view","walrus","whiskers","yaml"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha -R spec"},"devDependencies":{"mocha":"*","should":"^4.0.4","verb":"^0.2.15","verb-tag-jscomments":"^0.2.2"},"dependencies":{"delims":"^0.3.0"},"_id":"escape-delims@0.3.0","_shasum":"4ec29c2964df982a46ca5bd2ead8beaa8bbb89f9","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"4ec29c2964df982a46ca5bd2ead8beaa8bbb89f9","size":4130,"noattachment":false,"key":"/escape-delims/-/escape-delims-0.3.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/escape-delims/download/escape-delims-0.3.0.tgz"},"directories":{},"publish_time":1410690966149,"_cnpm_publish_time":1410690966149,"_hasShrinkwrap":false},"0.2.0":{"name":"escape-delims","description":"Escape delimiters in templates. Used with Lo-Dash and underscore templates but could be used with other template engines as well.","version":"0.2.0","homepage":"https://github.com/jonschlinkert/escape-delims","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git://github.com/jonschlinkert/escape-delims.git"},"bugs":{"url":"https://github.com/jonschlinkert/escape-delims/issues"},"licenses":[{"type":"MIT","url":"https://github.com/jonschlinkert/escape-delims/blob/master/LICENSE-MIT"}],"keywords":["templates","lodash","lo-dash","underscore","demlim","demlims","demlimiter","demlimiters"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha -R spec"},"devDependencies":{"chai":"~1.9.1","lodash":"^2.4.1","mocha":"*","should":"^4.0.4","verb":"~0.2.6"},"dependencies":{"delims":"^0.3.0","frep":"^0.2.1"},"_id":"escape-delims@0.2.0","_shasum":"c1cd249a5077c17806ddecab7c6a5f8c6960a3aa","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"c1cd249a5077c17806ddecab7c6a5f8c6960a3aa","size":3259,"noattachment":false,"key":"/escape-delims/-/escape-delims-0.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/escape-delims/download/escape-delims-0.2.0.tgz"},"directories":{},"publish_time":1407729935192,"_cnpm_publish_time":1407729935192,"_hasShrinkwrap":false},"0.1.1":{"name":"escape-delims","description":"Escape delimiters in templates. Used with Lo-Dash and underscore templates but could be used with other template engines as well.","version":"0.1.1","homepage":"https://github.com/jonschlinkert/escape-delims","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git://github.com/jonschlinkert/escape-delims.git"},"bugs":{"url":"https://github.com/jonschlinkert/escape-delims/issues"},"licenses":[{"type":"MIT","url":"https://github.com/jonschlinkert/escape-delims/blob/master/LICENSE-MIT"}],"keywords":["templates","lodash","lo-dash","underscore","demlim","demlims","demlimiter","demlimiters"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha -R spec"},"devDependencies":{"verb":"~0.2.6","chai":"~1.9.1","mocha":"*"},"dependencies":{"frep":"^0.2.1"},"_id":"escape-delims@0.1.1","_shasum":"9a6f2911f16daf550eee12dbf334a7bd9730a7ea","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"9a6f2911f16daf550eee12dbf334a7bd9730a7ea","size":2886,"noattachment":false,"key":"/escape-delims/-/escape-delims-0.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/escape-delims/download/escape-delims-0.1.1.tgz"},"directories":{},"publish_time":1404762828653,"_cnpm_publish_time":1404762828653,"_hasShrinkwrap":false},"0.1.0":{"name":"escape-delims","description":"Escape delimiters in templates. Used with Lo-Dash and underscore templates but could be used with other template engines as well.","version":"0.1.0","homepage":"https://github.com/jonschlinkert/escape-delims","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git://github.com/jonschlinkert/escape-delims.git"},"bugs":{"url":"https://github.com/jonschlinkert/escape-delims/issues"},"licenses":[{"type":"MIT","url":"https://github.com/jonschlinkert/escape-delims/blob/master/LICENSE-MIT"}],"keywords":["templates","lodash","lo-dash","underscore","demlim","demlims","demlimiter","demlimiters"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha -R spec"},"devDependencies":{"verb":"~0.2.6","chai":"~1.9.1","mocha":"*"},"dependencies":{"frep":"^0.2.1"},"_id":"escape-delims@0.1.0","_shasum":"2522a2021c03eb6907354cdf7411ca5cdd7aed8d","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"2522a2021c03eb6907354cdf7411ca5cdd7aed8d","size":2644,"noattachment":false,"key":"/escape-delims/-/escape-delims-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/escape-delims/download/escape-delims-0.1.0.tgz"},"directories":{},"publish_time":1404762570962,"_cnpm_publish_time":1404762570962,"_hasShrinkwrap":false}},"readme":"# escape-delims [![NPM version](https://badge.fury.io/js/escape-delims.svg)](http://badge.fury.io/js/escape-delims)\n\n> Escape and un-escape delimiters in templates. Tested with Lo-Dash, underscore and Handlebars syntax, but could be used with other template engines/syntaxes as well. This is similar to the process used by Yeoman on escaped templates in generators.\n\n## Install\n### Install with [npm](npmjs.org):\n\n```bash\nnpm i escape-delims --save-dev\n```\n\n## Usage\n\n```js\nvar EscapeDelims = require('escape-delims');\n```\n\n## API\n## [EscapeDelims](index.js#L34)\n\nCreate a new instance of `EscapeDelims()`:\n\n* `from` **{Array}**: Optionally pass delimiters to use for escaping. Defaults to `['{%%', '%}']`.    \n* `to` **{Array}**: Optionally pass delimiters to use for un-escaping. Defaults to `['{%%', '%}']`.    \n\n```js\nvar EscapeDelims = require('escape-delims');\nvar escapeDelims = new EscapeDelims();\n```\n\nOptionally pass the \"escape delimiters\" to use as an array:\n\n```js\nvar escapeDelims = new EscapeDelims(['<%%', '%>']);\n```\n\n## [.escape](index.js#L59)\n\nEscape the given `str`, optionally passing a delimiter `syntax` to use if not defined in the constructor.\n\n* `str` **{String}**: The string with delimiters to escape.    \n* `from` **{Array}**: The delimiter syntax to use.    \n\n**Example:**\n\n```js\nescapeDelims.escape('<%%= first %><%= last %>', ['<%%', '%>']);\n//=> '(;^__^;) first (;\\^_\\^;)<%= last %>'\n```\n\n## [.unescape](index.js#L80)\n\nUn-escape previously escaped delimiters in the given `str`. Optionally pass the `syntax` to use if they have not already been defined.\n\n* `str` **{String}**: The string with delimiters that need to be escaped.    \n* `to` **{Array}**: The delimiter syntax to use for un-escaping.    \n\n**Example:**\n\n```js\nescapeDelims.unescape('(;^__^;) first (;\\^_\\^;)<%= last %>', ['<%%', '%>']);\n//=> '<%= first %><%= last %>'\n```\n\n## Author\n\n**Jon Schlinkert**\n \n+ [github/jonschlinkert](https://github.com/jonschlinkert)\n+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) \n\n## License\nCopyright (c) 2014 Jon Schlinkert  \nReleased under the MIT license\n\n***\n\n_This file was generated by [verb](https://github.com/jonschlinkert/verb) on November 11, 2014._","_attachments":{},"homepage":"https://github.com/jonschlinkert/escape-delims","bugs":{"url":"https://github.com/jonschlinkert/escape-delims/issues"}}