106 lines
4.8 KiB
JSON
106 lines
4.8 KiB
JSON
|
{
|
||
|
"_args": [
|
||
|
[
|
||
|
{
|
||
|
"raw": "preserve@^0.2.0",
|
||
|
"scope": null,
|
||
|
"escapedName": "preserve",
|
||
|
"name": "preserve",
|
||
|
"rawSpec": "^0.2.0",
|
||
|
"spec": ">=0.2.0 <0.3.0",
|
||
|
"type": "range"
|
||
|
},
|
||
|
"/Volumes/2009-SSD/GT2/GT2-iOS/node_modules/braces"
|
||
|
]
|
||
|
],
|
||
|
"_from": "preserve@>=0.2.0 <0.3.0",
|
||
|
"_id": "preserve@0.2.0",
|
||
|
"_inCache": true,
|
||
|
"_location": "/preserve",
|
||
|
"_npmUser": {
|
||
|
"name": "jonschlinkert",
|
||
|
"email": "github@sellside.com"
|
||
|
},
|
||
|
"_npmVersion": "1.4.23",
|
||
|
"_phantomChildren": {},
|
||
|
"_requested": {
|
||
|
"raw": "preserve@^0.2.0",
|
||
|
"scope": null,
|
||
|
"escapedName": "preserve",
|
||
|
"name": "preserve",
|
||
|
"rawSpec": "^0.2.0",
|
||
|
"spec": ">=0.2.0 <0.3.0",
|
||
|
"type": "range"
|
||
|
},
|
||
|
"_requiredBy": [
|
||
|
"/braces"
|
||
|
],
|
||
|
"_resolved": "https://registry.npmjs.org/preserve/-/preserve-0.2.0.tgz",
|
||
|
"_shasum": "815ed1f6ebc65926f865b310c0713bcb3315ce4b",
|
||
|
"_shrinkwrap": null,
|
||
|
"_spec": "preserve@^0.2.0",
|
||
|
"_where": "/Volumes/2009-SSD/GT2/GT2-iOS/node_modules/braces",
|
||
|
"author": {
|
||
|
"name": "Jon Schlinkert",
|
||
|
"url": "https://github.com/jonschlinkert"
|
||
|
},
|
||
|
"bugs": {
|
||
|
"url": "https://github.com/jonschlinkert/preserve/issues"
|
||
|
},
|
||
|
"dependencies": {},
|
||
|
"description": "Temporarily substitute tokens in the given `string` with placeholders, then put them back after transforming the string.",
|
||
|
"devDependencies": {
|
||
|
"benchmarked": "^0.1.3",
|
||
|
"chalk": "^0.5.1",
|
||
|
"js-beautify": "^1.5.4",
|
||
|
"mocha": "*",
|
||
|
"should": "*"
|
||
|
},
|
||
|
"directories": {},
|
||
|
"dist": {
|
||
|
"shasum": "815ed1f6ebc65926f865b310c0713bcb3315ce4b",
|
||
|
"tarball": "https://registry.npmjs.org/preserve/-/preserve-0.2.0.tgz"
|
||
|
},
|
||
|
"engines": {
|
||
|
"node": ">=0.10.0"
|
||
|
},
|
||
|
"gitHead": "1bf405d35e4aea06a2ee83db2d34dc54abc0a1f9",
|
||
|
"homepage": "https://github.com/jonschlinkert/preserve",
|
||
|
"keywords": [
|
||
|
"escape",
|
||
|
"format",
|
||
|
"placeholder",
|
||
|
"placeholders",
|
||
|
"prettify",
|
||
|
"regex",
|
||
|
"replace",
|
||
|
"template",
|
||
|
"templates",
|
||
|
"token",
|
||
|
"tokens"
|
||
|
],
|
||
|
"license": {
|
||
|
"type": "MIT",
|
||
|
"url": "https://github.com/jonschlinkert/preserve/blob/master/LICENSE-MIT"
|
||
|
},
|
||
|
"main": "index.js",
|
||
|
"maintainers": [
|
||
|
{
|
||
|
"name": "jonschlinkert",
|
||
|
"email": "github@sellside.com"
|
||
|
}
|
||
|
],
|
||
|
"name": "preserve",
|
||
|
"optionalDependencies": {},
|
||
|
"readme": "# preserve [![NPM version](https://badge.fury.io/js/preserve.svg)](http://badge.fury.io/js/preserve)\n\n> Temporarily substitute tokens in the given `string` with placeholders, then put them back after transforming the string.\n\nUseful for protecting tokens, like templates in HTML, from being mutated when the string is transformed in some way, like from a formatter/beautifier.\n\n**Example without `preserve`**\n\nLet's say you want to use [js-beautify] on a string of html with Lo-Dash/Underscore templates, such as: `<ul><li><%= name %></li></ul>`:\n\njs-beautify will render the template unusable (and apply incorrect formatting because of the unfamiliar syntax from the Lo-Dash template):\n\n```html\n<ul>\n <li>\n <%=n ame %>\n </li>\n</ul>\n```\n\n**Example with `preserve`**\n\nCorrect.\n\n```html\n<ul>\n <li><%= name %></li>\n</ul>\n```\n\nFor the record, this is just a random example, I've had very few issues with js-beautify in general. But with or without js-beautify, this kind of token mangling does happen sometimes when you use formatters, beautifiers or similar tools.\n\n## Install\n## Install with [npm](npmjs.org)\n\n```bash\nnpm i preserve --save\n```\n\n## Run tests\n\n```bash\nnpm test\n```\n\n## API\n### [.before](index.js#L23)\n\nReplace tokens in `str` with a temporary, heuristic placeholder.\n\n* `str` **{String}** \n* `returns` **{String}**: String with placeholders. \n\n```js\ntokens.before('{a\\\\,b}');\n//=> '{__ID1__}'\n```\n\n### [.after](index.js#L44)\n\nReplace placeholders in `str` with original tokens.\n\n* `str` **{String}**: String with placeholders \n* `returns` **{String}** `str`: String with original tokens. \n\n```js\ntokens.after('{__ID1__}');\n//=> '{a\\\\,b}'\n```\n\n\n## Contributing\nPull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/preserve/issues)\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) 2015-2015, Jon Schlinkert.\nReleased under the MIT license\n\n***\n\n_This file was generated by [verb](https://github.com/assemble/verb) on January 10, 2015._\n\n[js-beautify]: https://github.com/beautify-web/js-beautify",
|
||
|
"readmeFilename": "README.md",
|
||
|
"repository": {
|
||
|
"type": "git",
|
||
|
"url": "git://github.com/jonschlinkert/preserve.git"
|
||
|
},
|
||
|
"scripts": {
|
||
|
"test": "mocha -R spec"
|
||
|
},
|
||
|
"version": "0.2.0"
|
||
|
}
|