{"_id":"nick","_rev":"4170349","name":"nick","description":"The smallest templating engine ever.","dist-tags":{"latest":"0.1.3"},"maintainers":[{"name":"synchronous","email":"sort@programmer.net"}],"time":{"modified":"2026-03-01T21:13:44.000Z","created":"2015-06-20T10:50:58.192Z","0.1.3":"2015-06-23T10:19:14.660Z","0.1.2":"2015-06-23T09:49:36.620Z","0.1.0":"2015-06-23T09:28:38.418Z","0.0.9":"2015-06-23T08:13:50.752Z","0.0.8":"2015-06-23T08:12:17.919Z","0.0.7":"2015-06-23T08:02:59.133Z","0.0.6":"2015-06-20T16:06:34.947Z","0.0.5":"2015-06-20T16:05:17.590Z","0.0.4":"2015-06-20T14:37:59.737Z","0.0.3":"2015-06-20T11:18:16.475Z","0.0.2":"2015-06-20T11:16:00.115Z","0.0.1":"2015-06-20T10:50:58.192Z"},"users":{},"author":{"name":"synchronous"},"repository":{"type":"git","url":"git+https://github.com/edge/nick.git"},"versions":{"0.1.3":{"name":"nick","version":"0.1.3","description":"The smallest templating engine ever.","main":"index.js","scripts":{"test":"node benchmark.js"},"keywords":["template","brace","enclosed","templating","engine"],"author":{"name":"synchronous"},"license":"MIT","devDependencies":{"benchmark":"^1.0.0","dot":"^1.0.3","handlebars":"^3.0.3","lodash":"^3.9.3"},"dependencies":{"benchmark":"^1.0.0"},"repository":{"type":"git","url":"git+https://github.com/edge/nick.git"},"bugs":{"url":"https://github.com/edge/nick/issues"},"homepage":"https://github.com/edge/nick#readme","gitHead":"151216c79814df98acc3d87847dbdff39c1628d2","_id":"nick@0.1.3","_shasum":"d8a30b7da789d417e0baa5437f33c487be9b6020","_from":".","_npmVersion":"2.11.2","_nodeVersion":"0.12.5","_npmUser":{"name":"synchronous","email":"sort@programmer.net"},"maintainers":[{"name":"synchronous","email":"sort@programmer.net"}],"dist":{"shasum":"d8a30b7da789d417e0baa5437f33c487be9b6020","size":2978,"noattachment":false,"key":"/nick/-/nick-0.1.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/nick/download/nick-0.1.3.tgz"},"directories":{},"publish_time":1435054754660,"_hasShrinkwrap":false,"_cnpm_publish_time":1435054754660,"_cnpmcore_publish_time":"2021-12-16T15:36:38.136Z"},"0.1.2":{"name":"nick","version":"0.1.2","description":"The smallest templating engine ever.","main":"index.js","scripts":{"test":"node benchmark.js"},"keywords":["template","brace","enclosed","templating","engine"],"author":{"name":"synchronous"},"license":"MIT","devDependencies":{"benchmark":"^1.0.0","dot":"^1.0.3","handlebars":"^3.0.3","lodash":"^3.9.3"},"dependencies":{"benchmark":"^1.0.0"},"repository":{"type":"git","url":"git+https://github.com/edge/nick.git"},"bugs":{"url":"https://github.com/edge/nick/issues"},"homepage":"https://github.com/edge/nick#readme","gitHead":"16b2aaf767cf49a8728030c5cc7a1f8d8c7f401a","_id":"nick@0.1.2","_shasum":"0b12a5a9e477950add180d38f89d35fee8f4c71a","_from":".","_npmVersion":"2.11.2","_nodeVersion":"0.12.5","_npmUser":{"name":"synchronous","email":"sort@programmer.net"},"maintainers":[{"name":"synchronous","email":"sort@programmer.net"}],"dist":{"shasum":"0b12a5a9e477950add180d38f89d35fee8f4c71a","size":2809,"noattachment":false,"key":"/nick/-/nick-0.1.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/nick/download/nick-0.1.2.tgz"},"directories":{},"publish_time":1435052976620,"_hasShrinkwrap":false,"_cnpm_publish_time":1435052976620,"_cnpmcore_publish_time":"2021-12-16T15:36:38.355Z"},"0.1.0":{"name":"nick","version":"0.1.0","description":"The smallest templating engine ever.","main":"index.js","scripts":{"test":"node benchmark.js"},"keywords":["template","brace","enclosed","templating","engine"],"author":{"name":"synchronous"},"license":"MIT","devDependencies":{"benchmark":"^1.0.0","dot":"^1.0.3","handlebars":"^3.0.3","lodash":"^3.9.3"},"dependencies":{"benchmark":"^1.0.0"},"repository":{"type":"git","url":"git+https://github.com/edge/nick.git"},"bugs":{"url":"https://github.com/edge/nick/issues"},"homepage":"https://github.com/edge/nick#readme","gitHead":"93e675d782a5ddce306ab365524cc3a4ba316a53","_id":"nick@0.1.0","_shasum":"8086fd5cc048e0a8314f0d0c8fcf923c52511f70","_from":".","_npmVersion":"2.11.2","_nodeVersion":"0.12.5","_npmUser":{"name":"synchronous","email":"sort@programmer.net"},"maintainers":[{"name":"synchronous","email":"sort@programmer.net"}],"dist":{"shasum":"8086fd5cc048e0a8314f0d0c8fcf923c52511f70","size":3242,"noattachment":false,"key":"/nick/-/nick-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/nick/download/nick-0.1.0.tgz"},"directories":{},"publish_time":1435051718418,"_hasShrinkwrap":false,"_cnpm_publish_time":1435051718418,"_cnpmcore_publish_time":"2021-12-16T15:36:38.525Z"},"0.0.9":{"name":"nick","version":"0.0.9","description":"The smallest templating engine ever.","main":"index.js","scripts":{"test":"node benchmark.js"},"keywords":["template","brace","enclosed","templating","engine"],"author":{"name":"synchronous"},"license":"MIT","devDependencies":{"benchmark":"^1.0.0"},"dependencies":{"benchmark":"^1.0.0"},"repository":{"type":"git","url":"git+https://github.com/edge/nick.git"},"bugs":{"url":"https://github.com/edge/nick/issues"},"homepage":"https://github.com/edge/nick#readme","gitHead":"e7de17b2756babfd48424ee3c59bb78db72a0fa3","_id":"nick@0.0.9","_shasum":"9c2a98490313116e2d2ec4e2d190147f8fd274d5","_from":".","_npmVersion":"2.11.2","_nodeVersion":"0.12.5","_npmUser":{"name":"synchronous","email":"sort@programmer.net"},"maintainers":[{"name":"synchronous","email":"sort@programmer.net"}],"dist":{"shasum":"9c2a98490313116e2d2ec4e2d190147f8fd274d5","size":2570,"noattachment":false,"key":"/nick/-/nick-0.0.9.tgz","tarball":"http://registry.cnpm.dingdandao.com/nick/download/nick-0.0.9.tgz"},"directories":{},"publish_time":1435047230752,"_hasShrinkwrap":false,"_cnpm_publish_time":1435047230752,"_cnpmcore_publish_time":"2021-12-16T15:36:38.752Z"},"0.0.8":{"name":"nick","version":"0.0.8","description":"The smallest templating engine ever.","main":"index.js","scripts":{"test":"node benchmark.js"},"keywords":["template","brace","enclosed","templating","engine"],"author":{"name":"synchronous"},"license":"MIT","devDependencies":{"benchmark":"^1.0.0"},"dependencies":{"benchmark":"^1.0.0"},"repository":{"type":"git","url":"git+https://github.com/edge/nick.git"},"bugs":{"url":"https://github.com/edge/nick/issues"},"homepage":"https://github.com/edge/nick#readme","gitHead":"a2a2c627e40ea540ddf858370df5fb25497c8eb4","_id":"nick@0.0.8","_shasum":"bf5d4ac9ba6ea57b2e9c913df5ad27a1468a8dee","_from":".","_npmVersion":"2.11.2","_nodeVersion":"0.12.5","_npmUser":{"name":"synchronous","email":"sort@programmer.net"},"maintainers":[{"name":"synchronous","email":"sort@programmer.net"}],"dist":{"shasum":"bf5d4ac9ba6ea57b2e9c913df5ad27a1468a8dee","size":2568,"noattachment":false,"key":"/nick/-/nick-0.0.8.tgz","tarball":"http://registry.cnpm.dingdandao.com/nick/download/nick-0.0.8.tgz"},"directories":{},"publish_time":1435047137919,"_hasShrinkwrap":false,"_cnpm_publish_time":1435047137919,"_cnpmcore_publish_time":"2021-12-16T15:36:38.985Z"},"0.0.7":{"name":"nick","version":"0.0.7","description":"The smallest templating engine ever.","main":"index.js","scripts":{"test":"node benchmark.js"},"keywords":["template","brace","enclosed","templating","engine"],"author":{"name":"synchronous"},"license":"MIT","devDependencies":{"benchmark":"^1.0.0"},"dependencies":{"benchmark":"^1.0.0"},"repository":{"type":"git","url":"git+https://github.com/edge/nick.git"},"bugs":{"url":"https://github.com/edge/nick/issues"},"homepage":"https://github.com/edge/nick#readme","gitHead":"d433ebc4cd9da7b08b699c4248dd2f30eeb3491a","_id":"nick@0.0.7","_shasum":"2c2883e463ce747903e0e58d31e48271fbf0ac53","_from":".","_npmVersion":"2.11.2","_nodeVersion":"0.12.5","_npmUser":{"name":"synchronous","email":"sort@programmer.net"},"maintainers":[{"name":"synchronous","email":"sort@programmer.net"}],"dist":{"shasum":"2c2883e463ce747903e0e58d31e48271fbf0ac53","size":2349,"noattachment":false,"key":"/nick/-/nick-0.0.7.tgz","tarball":"http://registry.cnpm.dingdandao.com/nick/download/nick-0.0.7.tgz"},"directories":{},"publish_time":1435046579133,"_hasShrinkwrap":false,"_cnpm_publish_time":1435046579133,"_cnpmcore_publish_time":"2021-12-16T15:36:39.251Z"},"0.0.6":{"name":"nick","version":"0.0.6","description":"The smallest templating engine ever.","main":"index.js","scripts":{"test":":"},"keywords":["template","brace","enclosed","templating","engine"],"author":{"name":"synchronous"},"license":"MIT","devDependencies":{"benchmark":"^1.0.0"},"gitHead":"a4236fa12db4558448070d1ecfd71215fee84666","_id":"nick@0.0.6","_shasum":"aca0b498b80b925d4301ffdad4c80578f13e74e6","_from":".","_npmVersion":"2.11.3","_nodeVersion":"2.3.0","_npmUser":{"name":"synchronous","email":"sort@programmer.net"},"maintainers":[{"name":"synchronous","email":"sort@programmer.net"}],"dist":{"shasum":"aca0b498b80b925d4301ffdad4c80578f13e74e6","size":2170,"noattachment":false,"key":"/nick/-/nick-0.0.6.tgz","tarball":"http://registry.cnpm.dingdandao.com/nick/download/nick-0.0.6.tgz"},"directories":{},"publish_time":1434816394947,"_hasShrinkwrap":false,"_cnpm_publish_time":1434816394947,"_cnpmcore_publish_time":"2021-12-16T15:36:39.503Z"},"0.0.5":{"name":"nick","version":"0.0.5","description":"The smallest templating engine ever.","main":"index.js","scripts":{"test":":"},"keywords":["template","brace","enclosed","templating","engine"],"author":{"name":"synchronous"},"license":"MIT","devDependencies":{"benchmark":"^1.0.0"},"gitHead":"915e0a4f1ecaf35e1c32102b5b067ce7cd476caa","_id":"nick@0.0.5","_shasum":"647055c007a11b5a3c03dce287eeee479f5505c1","_from":".","_npmVersion":"2.11.3","_nodeVersion":"2.3.0","_npmUser":{"name":"synchronous","email":"sort@programmer.net"},"maintainers":[{"name":"synchronous","email":"sort@programmer.net"}],"dist":{"shasum":"647055c007a11b5a3c03dce287eeee479f5505c1","size":2159,"noattachment":false,"key":"/nick/-/nick-0.0.5.tgz","tarball":"http://registry.cnpm.dingdandao.com/nick/download/nick-0.0.5.tgz"},"directories":{},"publish_time":1434816317590,"_hasShrinkwrap":false,"_cnpm_publish_time":1434816317590,"_cnpmcore_publish_time":"2021-12-16T15:36:39.679Z"},"0.0.4":{"name":"nick","version":"0.0.4","description":"The smallest templating engine ever.","main":"index.js","scripts":{"test":":"},"keywords":["template","brace","enclosed","templating","engine"],"author":{"name":"synchronous"},"license":"MIT","devDependencies":{"benchmark":"^1.0.0"},"gitHead":"1d7c59baaa27a9f8772f4b4f844236fac7f338df","_id":"nick@0.0.4","_shasum":"579bf0ae9ba168efd87e27be9f705e2189e4a26c","_from":".","_npmVersion":"2.11.3","_nodeVersion":"2.3.0","_npmUser":{"name":"synchronous","email":"sort@programmer.net"},"maintainers":[{"name":"synchronous","email":"sort@programmer.net"}],"dist":{"shasum":"579bf0ae9ba168efd87e27be9f705e2189e4a26c","size":2143,"noattachment":false,"key":"/nick/-/nick-0.0.4.tgz","tarball":"http://registry.cnpm.dingdandao.com/nick/download/nick-0.0.4.tgz"},"directories":{},"publish_time":1434811079737,"_hasShrinkwrap":false,"_cnpm_publish_time":1434811079737,"_cnpmcore_publish_time":"2021-12-16T15:36:39.873Z"},"0.0.3":{"name":"nick","version":"0.0.3","description":"The smallest templating engine ever.","main":"index.js","scripts":{"test":":"},"keywords":["template","brace","enclosed","templating","engine"],"author":{"name":"synchronous"},"license":"MIT","devDependencies":{"benchmark":"^1.0.0"},"gitHead":"9f7750d7c5a595d0f3503e2a5f03152b2f6e5e04","_id":"nick@0.0.3","_shasum":"1d49cadfaceab22aa59064b4d459880888a8aae9","_from":".","_npmVersion":"2.11.3","_nodeVersion":"2.3.0","_npmUser":{"name":"synchronous","email":"sort@programmer.net"},"maintainers":[{"name":"synchronous","email":"sort@programmer.net"}],"dist":{"shasum":"1d49cadfaceab22aa59064b4d459880888a8aae9","size":2049,"noattachment":false,"key":"/nick/-/nick-0.0.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/nick/download/nick-0.0.3.tgz"},"directories":{},"publish_time":1434799096475,"_hasShrinkwrap":false,"_cnpm_publish_time":1434799096475,"_cnpmcore_publish_time":"2021-12-16T15:36:40.105Z"},"0.0.2":{"name":"nick","version":"0.0.2","description":"The smallest templating engine ever.","main":"index.js","scripts":{"test":":"},"keywords":["template","brace","enclosed","templating","engine"],"author":{"name":"synchronous"},"license":"MIT","devDependencies":{"benchmark":"^1.0.0"},"gitHead":"b69541f58503ac7f43c746bf46e2ae47788eaff6","_id":"nick@0.0.2","_shasum":"d604aa7bfa97d3dfa31b21bc59f93c5908e39611","_from":".","_npmVersion":"2.11.3","_nodeVersion":"2.3.0","_npmUser":{"name":"synchronous","email":"sort@programmer.net"},"maintainers":[{"name":"synchronous","email":"sort@programmer.net"}],"dist":{"shasum":"d604aa7bfa97d3dfa31b21bc59f93c5908e39611","size":1969,"noattachment":false,"key":"/nick/-/nick-0.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/nick/download/nick-0.0.2.tgz"},"directories":{},"publish_time":1434798960115,"_hasShrinkwrap":false,"_cnpm_publish_time":1434798960115,"_cnpmcore_publish_time":"2021-12-16T15:36:40.481Z"},"0.0.1":{"name":"nick","version":"0.0.1","description":"The smallest templating engine ever.","main":"index.js","scripts":{"test":":"},"keywords":["template","brace","enclosed","templating","engine"],"author":{"name":"synchronous"},"license":"MIT","devDependencies":{"benchmark":"^1.0.0"},"gitHead":"a21194a54d221114aa8203832b3d1c5c40c5d73e","_id":"nick@0.0.1","_shasum":"7d69fb431d11eea3239a1694f939f4fa2b834ae6","_from":".","_npmVersion":"2.11.2","_nodeVersion":"2.3.0","_npmUser":{"name":"synchronous","email":"sort@programmer.net"},"maintainers":[{"name":"synchronous","email":"sort@programmer.net"}],"dist":{"shasum":"7d69fb431d11eea3239a1694f939f4fa2b834ae6","size":1514,"noattachment":false,"key":"/nick/-/nick-0.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/nick/download/nick-0.0.1.tgz"},"directories":{},"publish_time":1434797458192,"_hasShrinkwrap":false,"_cnpm_publish_time":1434797458192,"_cnpmcore_publish_time":"2021-12-16T15:36:40.748Z"}},"readme":"# nick\n## The smallest templating engine ever.\n\n`nick` is a no-nonsense string templating engine written in 10 lines (plus 8 lines of optimization).\n\nA browser build is available [here](https://raw.githubusercontent.com/edge/nick/master/lib/nick.js). It is available globally as `Nick`.\n\n* [Installation](#installation)\n* [Usage](#usage)\n\t* [API](#api)\n\t* [Basic](#basic)\n\t* [Custom Delimiters](#custom-delimiters)\n* [Benchmarks](#benchmarks)\n\n## Installation\n\n```\n$ npm i nick\n```\n\n## Usage\n\n### API\n\n```\nnick(templateString, [delimiterRegex])\n```\n\n### Basic\n\nAnything inside a pair of delimiters will be a simple object access.\n\n```js\nvar nick = require('nick');\n\n// Create a reusable template function\nvar resume = nick('My name is { name }, and I am a { job } working at { company }. I have { years } years of experience in the field of { field }.');\n\nvar me = resume({\n\tname: 'Haskell Curry',\n\tjob: 'logician',\n\tcompany: 'λ Combinator',\n\tyears: 100,\n\tfield: 'combinatory logic'\n});\n\n// My name is Haskell Curry, and I am a logician working at λ Combinator. I have 100 years of experience in the field of combinatory logic.\n```\n\n### Custom Delimiters\n\n`nick` also takes a regular expression as an optional second argument, which defines what delimiter is used for the template.\n\n```js\nvar thing = nick('I like to do {{{{{adjective}}}}} things.', /[\\{\\}]{5}/);\n\nvar result = thing({ adjective: 'random' });\n\n// I like to do random things.\n```\n\n## Benchmarks\n\nThe benchmarks were written with templates in the recommended style of their respective engines, profiling the performance of the example provided in [Basic](#basic).\n\n```\nnick x 13,253,638 ops/sec ±0.88% (96 runs sampled)\nlodash x 510,826 ops/sec ±0.23% (101 runs sampled)\ndoT x 12,309,561 ops/sec ±0.82% (98 runs sampled)\nHandlebars x 2,196,357 ops/sec ±0.44% (99 runs sampled)\n```\n\n![https://dl.bucket.pw/fyiyux.png](https://dl.bucket.pw/fyiyux.png)\n","_attachments":{},"homepage":"https://github.com/edge/nick#readme","bugs":{"url":"https://github.com/edge/nick/issues"},"license":"MIT"}