{"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","tarball":"http://registry-npm.ywwl.com/nick/download/nick-0.0.6.tgz","integrity":"sha512-63aHHZsOZpp0szAqc1VV0GqWgbI8GVDa3/Je3lgo1hWrm3AWTT7ftN6j5cuFIywFFfbFuksMkXDk063bXLN88g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBPtZ8qql2qxUuUUFQSeCiEM90NCu6eu/U4S5U/riH+sAiB+NDyRFD73+fSM/wUthMJnwFl2jAkvOoDs9wg+cZY5YA=="}],"size":2170,"noattachment":false,"key":"/nick/-/nick-0.0.6.tgz"},"directories":{},"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","publish_time":1434816394947,"_cnpm_publish_time":1434816394947,"dist-tags":{"latest":"0.1.3"}}