{"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","tarball":"http://registry-npm.ywwl.com/nick/download/nick-0.0.4.tgz","integrity":"sha512-I0imcRixB9SyXRryU4CzYPToJhEKlLP6KD6TWOPV7L5HE+CJb27hKi4ByEckN1jVEUTP6M1bwgFY46GTREfOkg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEagAHrWJ/hclJgNqVdmPEpYCBAkq1k7IYVgCOtWYfcJAiAdN9ZiyMoTiYG/AsUOFCdxMckjFTGautvIw9KNcmAGKQ=="}],"size":2143,"noattachment":false,"key":"/nick/-/nick-0.0.4.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":1434811079737,"_cnpm_publish_time":1434811079737,"dist-tags":{"latest":"0.1.3"}}