{"_id":"es6template","_rev":"3145047","name":"es6template","description":"Easy and small template engine for the browser.","dist-tags":{"latest":"1.0.5"},"maintainers":[{"name":"zalmoxisus","email":""}],"time":{"modified":"2023-11-27T07:13:46.000Z","created":"2016-06-24T14:41:27.998Z","1.0.5":"2016-06-25T15:55:08.168Z","1.0.4":"2016-06-24T14:41:27.998Z"},"users":{},"author":{"name":"Charlike Mike Reagent","email":"@tunnckoCore","url":"http://www.tunnckocore.tk"},"repository":{"type":"git","url":"https://github.com/zalmoxisus/es6-template"},"versions":{"1.0.5":{"name":"es6template","version":"1.0.5","description":"Easy and small template engine for the browser.","repository":{"type":"git","url":"https://github.com/zalmoxisus/es6-template"},"author":{"name":"Charlike Mike Reagent","email":"@tunnckoCore","url":"http://www.tunnckocore.tk"},"main":"index.js","license":"MIT","scripts":{"prebuild":"npm install && npm test && mkdirp dist","build":"npm run bundle && npm run standalone","bundle":"browserify -dr ./index.js:es6-template -o dist/es6-template.js","postbundle":"uglifyjs dist/es6-template.js -m -c -o dist/es6-template.min.js","standalone":"browserify -ds es6-template index.js -o dist/es6-template.standalone.js","poststandalone":"uglifyjs dist/es6-template.standalone.js -m -c -o dist/es6-template.standalone.min.js","test":"node test.js"},"dependencies":{"es6-template-regex":"^0.1.1","extend-shallow":"^2.0.1","get-value":"^2.0.2","sliced":"^1.0.1"},"devDependencies":{"assertit":"^0.1.0","browserify":"^13.0.0","mkdirp":"^0.5.1","uglify-js":"^2.6.1"},"files":["index.js","utils.js"],"keywords":["easy","ecma","ecmascript","engine","es6","regex","simple","small","string","template","tpl"],"standard":{"ignore":["dist/**"]},"gitHead":"8e023ae2473a75933d2d2fb234e3dbc3c56be021","bugs":{"url":"https://github.com/zalmoxisus/es6-template/issues"},"homepage":"https://github.com/zalmoxisus/es6-template","_id":"es6template@1.0.5","_shasum":"3bbbb979fa6b8ae765b0c986310f720072562a9f","_from":".","_npmVersion":"3.7.3","_nodeVersion":"5.8.0","_npmUser":{"name":"zalmoxisus","email":"zalmoxisus@gmail.com"},"dist":{"shasum":"3bbbb979fa6b8ae765b0c986310f720072562a9f","size":3942,"noattachment":false,"key":"/es6template/-/es6template-1.0.5.tgz","tarball":"http://registry.cnpm.dingdandao.com/es6template/download/es6template-1.0.5.tgz"},"maintainers":[{"name":"zalmoxisus","email":""}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/es6template-1.0.5.tgz_1466870105803_0.835069797700271"},"directories":{},"publish_time":1466870108168,"_hasShrinkwrap":false,"_cnpm_publish_time":1466870108168,"_cnpmcore_publish_time":"2021-12-17T00:05:13.115Z"},"1.0.4":{"name":"es6template","version":"1.0.4","description":"Easy and small template engine for the browser.","repository":{"type":"git","url":"https://github.com/zalmoxisus/es6-template"},"author":{"name":"Charlike Mike Reagent","email":"@tunnckoCore","url":"http://www.tunnckocore.tk"},"main":"index.js","license":"MIT","scripts":{"prebuild":"npm install && npm test && mkdirp dist","build":"npm run bundle && npm run standalone","bundle":"browserify -dr ./index.js:es6-template -o dist/es6-template.js","postbundle":"uglifyjs dist/es6-template.js -m -c -o dist/es6-template.min.js","standalone":"browserify -ds es6-template index.js -o dist/es6-template.standalone.js","poststandalone":"uglifyjs dist/es6-template.standalone.js -m -c -o dist/es6-template.standalone.min.js","test":"node test.js"},"dependencies":{"es6-template-regex":"^0.1.1","extend-shallow":"^2.0.1","get-value":"^2.0.2","sliced":"^1.0.1"},"devDependencies":{"assertit":"^0.1.0","browserify":"^13.0.0","mkdirp":"^0.5.1","uglify-js":"^2.6.1"},"files":["index.js","utils.js"],"keywords":["easy","ecma","ecmascript","engine","es6","regex","simple","small","string","template","tpl"],"standard":{"ignore":["dist/**"]},"gitHead":"8e023ae2473a75933d2d2fb234e3dbc3c56be021","bugs":{"url":"https://github.com/zalmoxisus/es6-template/issues"},"homepage":"https://github.com/zalmoxisus/es6-template","_id":"es6template@1.0.4","_shasum":"1448022d277969679f74881e97fb8c809d7c2e63","_from":".","_npmVersion":"3.7.3","_nodeVersion":"5.8.0","_npmUser":{"name":"zalmoxisus","email":"zalmoxisus@gmail.com"},"dist":{"shasum":"1448022d277969679f74881e97fb8c809d7c2e63","size":3956,"noattachment":false,"key":"/es6template/-/es6template-1.0.4.tgz","tarball":"http://registry.cnpm.dingdandao.com/es6template/download/es6template-1.0.4.tgz"},"maintainers":[{"name":"zalmoxisus","email":""}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/es6template-1.0.4.tgz_1466779285497_0.9361388890538365"},"directories":{},"publish_time":1466779287998,"_hasShrinkwrap":false,"_cnpm_publish_time":1466779287998,"_cnpmcore_publish_time":"2021-12-17T00:05:13.328Z"}},"readme":"# [es6-template][author-www-url] [![npmjs.com][npmjs-img]][npmjs-url] [![The MIT License][license-img]][license-url] \n\n> Easy and small template engine for the browser and nodejs.\n\n[![code climate][codeclimate-img]][codeclimate-url] [![standard code style][standard-img]][standard-url] [![travis build status][travis-img]][travis-url] [![coverage status][coveralls-img]][coveralls-url] [![dependency status][david-img]][david-url]\n\n\n## Install\n```\nnpm i es6-template --save\n```\n\n\n## Usage\n> For more use-cases see the [tests](./test.js)\n\n```js\nvar es6template = require('es6-template')\n```\n\n### [es6template](./index#L31)\n> Acts like `.render` by default. Renders given `str` with `locals`.\n\n- `str` **{String}** template to populate with `locals`\n- `locals` **{Object}** locals object\n- `return` **{String}** rendered string\n\n**Example**\n\n```js\nes6template('foo ${bar} baz ${quux}', {bar: 'BAR'}, {quux: 'QUUX'})\n//=> 'foo BAR baz QUUX'\n```\n\n### [.render](./index#L58)\n> Renders given `str` with `locals`. You can give unlimited number of object \narguments after the first - they will be merged and passed as single locals object.\n\n- `str` **{String}** template to populate with `locals`\n- `locals` **{Object}** locals object\n- `return` **{String}** rendered string\n\n**Example**\n\n```js\nes6template.render('Hello ${place} and ${user.name}!', {\n  place: 'world',\n  user: {\n    name: 'Charlike'\n  }\n})\n//=> 'Hello world and Charlike!'\n```\n\n### [.compile](./index#L79)\n> Compiles given string and returns function which accepts\n unlimited number of `locals` object arguments.\n\n- `str` **{String}** template to populate\n- `return` **{Function}** which accepts `locals` objects\n\n**Example**\n\n```js\nvar fn = es6template.compile('Hello ${place} and ${user.name}!')\nfn({place: 'world', user: {name: 'Charlike'}})\n//=> 'Hello world and Charlike!'\n```\n\n\n## Related\n- [es6-template-regex](https://github.com/jonschlinkert/es6-template-regex): Regular expression for matching es6 template delimiters in a string.\n- [es6-template-strings](https://github.com/medikoo/es6-template-strings): Compile and resolve template strings notation as specified in ES6\n- [gulp-es6-template](https://github.com/tunnckoCore/gulp-es6-template): Gulp plugin for `es6-template` - easy and small template engine.\n- [gulp-es6-template-strings](https://github.com/tunnckoCore/gulp-es6-template-strings): Gulp plugin for `es6-template-strings` package.\n- [j140](https://github.com/tunnckoCore/j140): Javascript template engine in just 140 bytes, for browser and node - by Jed Schmidt\n- [jstransformer-es6-template](https://github.com/tunnckoCore/jstransformer-es6-template): es6-template support for JSTransformers\n- [jstransformer-es6-template-strings](https://github.com/jstransformers/jstransformer-es6-template-strings): es6-template-strings support for JSTransformers\n\n\n## Contributing\nPull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/tunnckoCore/es6-template/issues/new).  \nBut before doing anything, please read the [CONTRIBUTING.md](./CONTRIBUTING.md) guidelines.\n\n\n## [Charlike Make Reagent](http://j.mp/1stW47C) [![new message to charlike][new-message-img]][new-message-url] [![freenode #charlike][freenode-img]][freenode-url]\n\n[![tunnckocore.tk][author-www-img]][author-www-url] [![keybase tunnckocore][keybase-img]][keybase-url] [![tunnckoCore npm][author-npm-img]][author-npm-url] [![tunnckoCore twitter][author-twitter-img]][author-twitter-url] [![tunnckoCore github][author-github-img]][author-github-url]\n\n\n[npmjs-url]: https://www.npmjs.com/package/es6-template\n[npmjs-img]: https://img.shields.io/npm/v/es6-template.svg?label=es6-template\n\n[license-url]: https://github.com/tunnckoCore/es6-template/blob/master/LICENSE.md\n[license-img]: https://img.shields.io/badge/license-MIT-blue.svg\n\n\n[codeclimate-url]: https://codeclimate.com/github/tunnckoCore/es6-template\n[codeclimate-img]: https://img.shields.io/codeclimate/github/tunnckoCore/es6-template.svg\n\n[travis-url]: https://travis-ci.org/tunnckoCore/es6-template\n[travis-img]: https://img.shields.io/travis/tunnckoCore/es6-template.svg\n\n[coveralls-url]: https://coveralls.io/r/tunnckoCore/es6-template\n[coveralls-img]: https://img.shields.io/coveralls/tunnckoCore/es6-template.svg\n\n[david-url]: https://david-dm.org/tunnckoCore/es6-template\n[david-img]: https://img.shields.io/david/tunnckoCore/es6-template.svg\n\n[standard-url]: https://github.com/feross/standard\n[standard-img]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg\n\n\n[author-www-url]: http://www.tunnckocore.tk\n[author-www-img]: https://img.shields.io/badge/www-tunnckocore.tk-fe7d37.svg\n\n[keybase-url]: https://keybase.io/tunnckocore\n[keybase-img]: https://img.shields.io/badge/keybase-tunnckocore-8a7967.svg\n\n[author-npm-url]: https://www.npmjs.com/~tunnckocore\n[author-npm-img]: https://img.shields.io/badge/npm-~tunnckocore-cb3837.svg\n\n[author-twitter-url]: https://twitter.com/tunnckoCore\n[author-twitter-img]: https://img.shields.io/badge/twitter-@tunnckoCore-55acee.svg\n\n[author-github-url]: https://github.com/tunnckoCore\n[author-github-img]: https://img.shields.io/badge/github-@tunnckoCore-4183c4.svg\n\n[freenode-url]: http://webchat.freenode.net/?channels=charlike\n[freenode-img]: https://img.shields.io/badge/freenode-%23charlike-5654a4.svg\n\n[new-message-url]: https://github.com/tunnckoCore/ama\n[new-message-img]: https://img.shields.io/badge/ask%20me-anything-green.svg","_attachments":{},"homepage":"https://github.com/zalmoxisus/es6-template","bugs":{"url":"https://github.com/zalmoxisus/es6-template/issues"},"license":"MIT"}