{"_id":"string-template","_rev":"52891","name":"string-template","description":"A simple string template function based on named or indexed arguments","dist-tags":{"latest":"1.0.0"},"maintainers":[{"name":"mattesch","email":"matt@mattesch.info"}],"time":{"modified":"2021-06-03T10:16:08.000Z","created":"2013-09-30T06:49:02.028Z","1.0.0":"2016-01-07T19:53:15.770Z","0.2.1":"2015-05-06T06:04:30.890Z","0.2.0":"2014-05-12T06:23:18.240Z","0.1.3":"2013-11-18T13:30:44.667Z","0.1.2":"2013-11-18T04:57:34.975Z","0.1.1":"2013-09-30T07:49:23.653Z","0.1.0":"2013-09-30T06:49:02.028Z"},"users":{"roberkules":true,"alexu84":true,"samhwang1990":true,"rakeshmakam":true,"devebot":true,"thinhair":true,"jshaw3":true,"vonthar":true,"wendellm":true,"eijs":true,"anoubis":true,"stephenliu1944":true,"d7game":true,"areasis":true,"kakaman":true,"poolpeggy":true,"guzgarcia":true,"vivek.vikhere":true,"bittercoffee":true,"kodekracker":true,"karthick.t13":true,"rubiadias":true,"khai96_":true,"zzzze":true},"author":{"name":"Matt-Esch","email":"matt@mattesch.info"},"repository":{"type":"git","url":"git://github.com/Matt-Esch/string-template.git"},"versions":{"1.0.0":{"name":"string-template","version":"1.0.0","description":"A simple string template function based on named or indexed arguments","keywords":["template","string","format","replace","arguments"],"author":{"name":"Matt-Esch","email":"matt@mattesch.info"},"repository":{"type":"git","url":"git://github.com/Matt-Esch/string-template.git"},"main":"index","homepage":"https://github.com/Matt-Esch/string-template","contributors":[{"name":"Matt-Esch"}],"bugs":{"url":"https://github.com/Matt-Esch/string-template/issues","email":"matt@mattesch.info"},"dependencies":{},"devDependencies":{"istanbul":"^0.4.1","opn":"^3.0.3","tape":"~1.1.1"},"license":"MIT","scripts":{"test":"node ./test/index.js","travis-test":"istanbul cover ./test/index.js && ((cat coverage/lcov.info | coveralls) || exit 0)","cover":"istanbul cover --report none --print detail ./test/index.js","view-cover":"istanbul report html && opn --no-wait ./coverage/index.html"},"testling":{"files":"test/index.js","browsers":["ie/8..latest","firefox/16..latest","firefox/nightly","chrome/22..latest","chrome/canary","opera/12..latest","opera/next","safari/5.1..latest","ipad/6.0..latest","iphone/6.0..latest","android-browser/4.2..latest"]},"gitHead":"1a936280d4c9569035f9ac6a9808df564d413b30","_id":"string-template@1.0.0","_shasum":"9e9f2233dc00f218718ec379a28a5673ecca8b96","_from":".","_npmVersion":"2.11.3","_nodeVersion":"0.10.32","_npmUser":{"name":"mattesch","email":"matt@mattesch.info"},"dist":{"shasum":"9e9f2233dc00f218718ec379a28a5673ecca8b96","size":20438,"noattachment":false,"key":"/string-template/-/string-template-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/string-template/download/string-template-1.0.0.tgz"},"maintainers":[{"name":"mattesch","email":"matt@mattesch.info"}],"directories":{},"publish_time":1452196395770,"_cnpm_publish_time":1452196395770,"_hasShrinkwrap":false},"0.2.1":{"name":"string-template","version":"0.2.1","description":"A simple string template function based on named or indexed arguments","keywords":["template","string","format","replace","arguments"],"author":{"name":"Matt-Esch","email":"matt@mattesch.info"},"repository":{"type":"git","url":"git://github.com/Matt-Esch/string-template.git"},"main":"index","homepage":"https://github.com/Matt-Esch/string-template","contributors":[{"name":"Matt-Esch"}],"bugs":{"url":"https://github.com/Matt-Esch/string-template/issues","email":"matt@mattesch.info"},"dependencies":{},"devDependencies":{"tape":"~1.1.1"},"licenses":[{"type":"MIT","url":"http://github.com/Matt-Esch/string-template/raw/master/LICENSE"}],"scripts":{"test":"node ./test/index.js","travis-test":"istanbul cover ./test/index.js && ((cat coverage/lcov.info | coveralls) || exit 0)","cover":"istanbul cover --report none --print detail ./test/index.js","view-cover":"istanbul report html && google-chrome ./coverage/index.html"},"testling":{"files":"test/index.js","browsers":["ie/8..latest","firefox/16..latest","firefox/nightly","chrome/22..latest","chrome/canary","opera/12..latest","opera/next","safari/5.1..latest","ipad/6.0..latest","iphone/6.0..latest","android-browser/4.2..latest"]},"gitHead":"311a15c48344fe386ec139906efc382af22f33b6","_id":"string-template@0.2.1","_shasum":"42932e598a352d01fc22ec3367d9d84eec6c9add","_from":".","_npmVersion":"2.7.4","_nodeVersion":"0.10.32","_npmUser":{"name":"mattesch","email":"matt@mattesch.info"},"dist":{"shasum":"42932e598a352d01fc22ec3367d9d84eec6c9add","size":3863,"noattachment":false,"key":"/string-template/-/string-template-0.2.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/string-template/download/string-template-0.2.1.tgz"},"maintainers":[{"name":"mattesch","email":"matt@mattesch.info"}],"directories":{},"publish_time":1430892270890,"_cnpm_publish_time":1430892270890,"_hasShrinkwrap":false},"0.2.0":{"name":"string-template","version":"0.2.0","description":"A simple string template function based on named or indexed arguments","keywords":["template","string","format","replace","arguments"],"author":{"name":"Matt-Esch","email":"matt@mattesch.info"},"repository":{"type":"git","url":"git://github.com/Matt-Esch/string-template.git"},"main":"index","homepage":"https://github.com/Matt-Esch/string-template","contributors":[{"name":"Matt-Esch"}],"bugs":{"url":"https://github.com/Matt-Esch/string-template/issues","email":"matt@mattesch.info"},"dependencies":{"js-string-escape":"^1.0.0"},"devDependencies":{"tape":"~1.1.1"},"licenses":[{"type":"MIT","url":"http://github.com/Matt-Esch/string-template/raw/master/LICENSE"}],"scripts":{"test":"node ./test/index.js","travis-test":"istanbul cover ./test/index.js && ((cat coverage/lcov.info | coveralls) || exit 0)","cover":"istanbul cover --report none --print detail ./test/index.js","view-cover":"istanbul report html && google-chrome ./coverage/index.html"},"testling":{"files":"test/index.js","browsers":["ie/8..latest","firefox/16..latest","firefox/nightly","chrome/22..latest","chrome/canary","opera/12..latest","opera/next","safari/5.1..latest","ipad/6.0..latest","iphone/6.0..latest","android-browser/4.2..latest"]},"_id":"string-template@0.2.0","dist":{"shasum":"7fd73e64316666552808af4508956987addc5f5b","size":3331,"noattachment":false,"key":"/string-template/-/string-template-0.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/string-template/download/string-template-0.2.0.tgz"},"_from":".","_npmVersion":"1.4.6","_npmUser":{"name":"mattesch","email":"matt@mattesch.info"},"maintainers":[{"name":"mattesch","email":"matt@mattesch.info"}],"directories":{},"publish_time":1399875798240,"_cnpm_publish_time":1399875798240,"_hasShrinkwrap":false},"0.1.3":{"name":"string-template","version":"0.1.3","description":"A simple string template function based on named or indexed arguments","keywords":["template","string","format","replace","arguments"],"author":{"name":"Matt-Esch","email":"matt@mattesch.info"},"repository":{"type":"git","url":"git://github.com/Matt-Esch/string-template.git"},"main":"index","homepage":"https://github.com/Matt-Esch/string-template","contributors":[{"name":"Matt-Esch"}],"bugs":{"url":"https://github.com/Matt-Esch/string-template/issues","email":"matt@mattesch.info"},"dependencies":{},"devDependencies":{"tape":"~1.1.1"},"licenses":[{"type":"MIT","url":"http://github.com/Matt-Esch/string-template/raw/master/LICENSE"}],"scripts":{"test":"node ./test/index.js","travis-test":"istanbul cover ./test/index.js && ((cat coverage/lcov.info | coveralls) || exit 0)","cover":"istanbul cover --report none --print detail ./test/index.js","view-cover":"istanbul report html && google-chrome ./coverage/index.html"},"testling":{"files":"test/index.js","browsers":["ie/8..latest","firefox/16..latest","firefox/nightly","chrome/22..latest","chrome/canary","opera/12..latest","opera/next","safari/5.1..latest","ipad/6.0..latest","iphone/6.0..latest","android-browser/4.2..latest"]},"readmeFilename":"Readme.md","_id":"string-template@0.1.3","dist":{"shasum":"b568d8e9d67095467ba5a97f3138285b574b57f1","size":2507,"noattachment":false,"key":"/string-template/-/string-template-0.1.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/string-template/download/string-template-0.1.3.tgz"},"_from":".","_npmVersion":"1.3.14","_npmUser":{"name":"mattesch","email":"matt@mattesch.info"},"maintainers":[{"name":"mattesch","email":"matt@mattesch.info"}],"directories":{},"publish_time":1384781444667,"_cnpm_publish_time":1384781444667,"_hasShrinkwrap":false},"0.1.2":{"name":"string-template","version":"0.1.2","description":"A simple string template function based on named or indexed arguments","keywords":["template","string","format","replace","arguments"],"author":{"name":"Matt-Esch","email":"matt@mattesch.info"},"repository":{"type":"git","url":"git://github.com/Matt-Esch/string-template.git"},"main":"index","homepage":"https://github.com/Matt-Esch/string-template","contributors":[{"name":"Matt-Esch"}],"bugs":{"url":"https://github.com/Matt-Esch/string-template/issues","email":"matt@mattesch.info"},"dependencies":{},"devDependencies":{"tape":"~1.1.1"},"licenses":[{"type":"MIT","url":"http://github.com/Matt-Esch/string-template/raw/master/LICENSE"}],"scripts":{"test":"node ./test/index.js","travis-test":"istanbul cover ./test/index.js && ((cat coverage/lcov.info | coveralls) || exit 0)","cover":"istanbul cover --report none --print detail ./test/index.js","view-cover":"istanbul report html && google-chrome ./coverage/index.html"},"testling":{"files":"test/index.js","browsers":["ie/8..latest","firefox/16..latest","firefox/nightly","chrome/22..latest","chrome/canary","opera/12..latest","opera/next","safari/5.1..latest","ipad/6.0..latest","iphone/6.0..latest","android-browser/4.2..latest"]},"readmeFilename":"Readme.md","_id":"string-template@0.1.2","dist":{"shasum":"06823aaf8f05e3c0b3602791a88673434307754a","size":2507,"noattachment":false,"key":"/string-template/-/string-template-0.1.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/string-template/download/string-template-0.1.2.tgz"},"_from":".","_npmVersion":"1.3.14","_npmUser":{"name":"mattesch","email":"matt@mattesch.info"},"maintainers":[{"name":"mattesch","email":"matt@mattesch.info"}],"directories":{},"publish_time":1384750654975,"_cnpm_publish_time":1384750654975,"_hasShrinkwrap":false},"0.1.1":{"name":"string-template","version":"0.1.1","description":"A simple string template function based on named or indexed arguments","keywords":["template","string","format","replace","arguments"],"author":{"name":"Matt-Esch","email":"matt@mattesch.info"},"repository":{"type":"git","url":"git://github.com/Matt-Esch/string-template.git"},"main":"index","homepage":"https://github.com/Matt-Esch/string-template","contributors":[{"name":"Matt-Esch"}],"bugs":{"url":"https://github.com/Matt-Esch/string-template/issues","email":"matt@mattesch.info"},"dependencies":{},"devDependencies":{"tape":"~1.1.1"},"licenses":[{"type":"MIT","url":"http://github.com/Matt-Esch/string-template/raw/master/LICENSE"}],"scripts":{"test":"node ./test/index.js","travis-test":"istanbul cover ./test/index.js && ((cat coverage/lcov.info | coveralls) || exit 0)","cover":"istanbul cover --report none --print detail ./test/index.js","view-cover":"istanbul report html && google-chrome ./coverage/index.html"},"testling":{"files":"test/index.js","browsers":["ie/8..latest","firefox/16..latest","firefox/nightly","chrome/22..latest","chrome/canary","opera/12..latest","opera/next","safari/5.1..latest","ipad/6.0..latest","iphone/6.0..latest","android-browser/4.2..latest"]},"readmeFilename":"Readme.md","_id":"string-template@0.1.1","dist":{"shasum":"468d671b411fa93cbf970c9011a268108b16e3b8","size":3237,"noattachment":false,"key":"/string-template/-/string-template-0.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/string-template/download/string-template-0.1.1.tgz"},"_from":".","_npmVersion":"1.2.32","_npmUser":{"name":"mattesch","email":"matt@mattesch.info"},"maintainers":[{"name":"mattesch","email":"matt@mattesch.info"}],"directories":{},"publish_time":1380527363653,"_cnpm_publish_time":1380527363653,"_hasShrinkwrap":false},"0.1.0":{"name":"string-template","version":"0.1.0","description":"A simple string template function based on named or indexed arguments","keywords":["template","string","format","replace","arguments"],"author":{"name":"Matt-Esch","email":"matt@mattesch.info"},"repository":{"type":"git","url":"git://github.com/Matt-Esch/string-template.git"},"main":"index","homepage":"https://github.com/Matt-Esch/string-template","contributors":[{"name":"Matt-Esch"}],"bugs":{"url":"https://github.com/Matt-Esch/string-template/issues","email":"matt@mattesch.info"},"dependencies":{},"devDependencies":{"tape":"~1.1.1"},"licenses":[{"type":"MIT","url":"http://github.com/Matt-Esch/string-template/raw/master/LICENSE"}],"scripts":{"test":"node ./test/index.js"},"readmeFilename":"Readme.md","_id":"string-template@0.1.0","dist":{"shasum":"d49350734c72c58f67b934f8aa32b8ded30efa0a","size":1901,"noattachment":false,"key":"/string-template/-/string-template-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/string-template/download/string-template-0.1.0.tgz"},"_from":".","_npmVersion":"1.2.32","_npmUser":{"name":"mattesch","email":"matt@mattesch.info"},"maintainers":[{"name":"mattesch","email":"matt@mattesch.info"}],"directories":{},"publish_time":1380523742028,"_cnpm_publish_time":1380523742028,"_hasShrinkwrap":false}},"readme":"# string-template\n\n[![build status][1]][2] [![dependency status][3]][4] [![coverage report][9]][10] [![stability index][15]][16]\n\n[![npm stats][13]][14]\n\n[![browser support][5]][6]\n\n  A simple string template function based on named or indexed arguments\n\n## Example\n\n```js\nvar format = require(\"string-template\")\nvar greeting\n\n// Format using an object hash with keys matching [0-9a-zA-Z]+\n\ngreeting = format(\"Hello {name}, you have {count} unread messages\", {\n    name: \"Robert\",\n    count: 12\n})\n// greeting -> \"Hello Robert, you have 12 unread messages\"\n\n\n// Format using a number indexed array\n\ngreeting = format(\"Hello {0}, you have {1} unread messages\", [\"Robert\", 12])\n// greeting -> \"Hello Robert, you have 12 unread messages\"\n\n\n// Format using optional arguments\n\ngreeting = format(\"Hello {0}, you have {1} unread messages\",\n     \"Robert\",\n     12)\n// greeting -> \"Hello Robert, you have 12 unread messages\"\n\n\n// Escape {} pairs by using double {{}}\n\nvar text = format(\"{{0}}\")\n// text -> \"{0}\"\n\n```\n\n## Compiling templates\n\n`string-template` exposes two template compiling options for when you need the\nadditional performance. Arguments passed to the compiled template are of the\nsame structure as the main `string-template` function, so either a single\nobject/array or a list of arguments.\n\n```js\nvar compile = require(\"string-template/compile\")\n\nvar greetingTemplate = compile(\"Hello {0}, you have {1} unread messages\")\n\nvar greeting = greetingTemplate(\"Robert\", 12)\n// -> \"Hello Robert, you have 12 unread messages\"\n```\n\nPassing a truthy second argument to `compile` will opt into using `new Function`\nto generate a function. The function returned contains a literal string\nconcatenation statement, interleaving the correct arguments you have passed in.\n\n```js\nvar compile = require(\"string-template/compile\")\n\nvar greetingTemplate = compile(\"Hello {0}, you have {1} unread messages\", true)\n// -> greetingTemplate generated using new Function\n\nvar greeting = greetingTemplate([\"Robert\", 12])\n// -> \"Hello Robert, you have 12 unread messages\"\n```\n\n## Installation\n\n`npm install string-template`\n\n## Contributors\n\n - Matt-Esch\n\n## MIT Licenced\n\n  [1]: https://secure.travis-ci.org/Matt-Esch/string-template.png\n  [2]: https://travis-ci.org/Matt-Esch/string-template\n  [3]: https://david-dm.org/Matt-Esch/string-template.png\n  [4]: https://david-dm.org/Matt-Esch/string-template\n  [5]: https://ci.testling.com/Matt-Esch/string-template.png\n  [6]: https://ci.testling.com/Matt-Esch/string-template\n  [9]: https://coveralls.io/repos/Matt-Esch/string-template/badge.png\n  [10]: https://coveralls.io/r/Matt-Esch/string-template\n  [13]: https://nodei.co/npm/string-template.png?downloads=true&stars=true\n  [14]: https://nodei.co/npm/string-template\n  [15]: http://hughsk.github.io/stability-badges/dist/unstable.svg\n  [16]: http://github.com/hughsk/stability-badges\n\n  [7]: https://badge.fury.io/js/string-template.png\n  [8]: https://badge.fury.io/js/string-template\n  [11]: https://gemnasium.com/Matt-Esch/string-template.png\n  [12]: https://gemnasium.com/Matt-Esch/string-template\n","_attachments":{},"homepage":"https://github.com/Matt-Esch/string-template","bugs":{"url":"https://github.com/Matt-Esch/string-template/issues","email":"matt@mattesch.info"},"license":"MIT"}