{"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","tarball":"http://registry-npm.ywwl.com/nick/download/nick-0.0.5.tgz","integrity":"sha512-bEhp6Y/L4KtbPwjAcdYgaybW7tSxqmDHHaPXXghMok1HZ6bFLgTPgON8U0YZvfIWJN4Jen/1F4xgv8DA9UR87A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCW2gRWUhexhNzxn6dQ4HQ8RmtsSF7BVQHvkGBM6HcqJwIgFaUP2xerh/6WIpf7/7E6idKkOq7IPh5w/EaZCsVQ22E="}],"size":2159,"noattachment":false,"key":"/nick/-/nick-0.0.5.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":1434816317590,"_cnpm_publish_time":1434816317590,"dist-tags":{"latest":"0.1.3"}}