{"_id":"pug-runtime","_rev":"76571","name":"pug-runtime","description":"The runtime components for the pug templating language","dist-tags":{"canary":"3.0.1-canary-10","latest":"3.0.1"},"maintainers":[{"name":"forbeslindesay","email":"forbes@lindesay.co.uk"},{"name":"pug-bot","email":""}],"time":{"modified":"2021-06-03T10:24:41.000Z","created":"2015-12-12T00:08:24.038Z","3.0.1":"2021-02-28T19:31:54.139Z","3.0.1-canary-10":"2021-02-28T19:30:32.389Z","3.0.0":"2020-05-25T12:19:07.551Z","3.0.0-canary-2":"2020-05-25T12:18:42.397Z","3.0.0-canary-1":"2020-05-24T23:07:44.505Z","2.0.5":"2019-06-18T09:44:55.288Z","2.0.4":"2018-03-06T13:12:27.641Z","2.0.3":"2017-01-24T01:07:19.328Z","2.0.2":"2016-07-26T07:12:42.993Z","2.0.1":"2016-04-18T07:11:20.978Z","2.0.0":"2015-12-23T03:54:06.219Z","0.0.0":"2015-12-12T00:08:24.038Z"},"users":{},"author":{"name":"ForbesLindesay"},"repository":{"type":"git","url":"https://github.com/pugjs/pug/tree/master/packages/pug-runtime"},"versions":{"3.0.1":{"name":"pug-runtime","version":"3.0.1","description":"The runtime components for the pug templating language","keywords":["pug"],"devDependencies":{"uglify-js":"^2.6.1"},"scripts":{"prepublish":"node prepublish","pretest":"npm run prepublish","build":"node prepublish"},"repository":{"type":"git","url":"https://github.com/pugjs/pug/tree/master/packages/pug-runtime"},"browser":{"fs":false},"author":{"name":"ForbesLindesay"},"license":"MIT","_id":"pug-runtime@3.0.1","_nodeVersion":"12.20.2","_npmVersion":"6.14.11","dist":{"shasum":"f636976204723f35a8c5f6fad6acda2a191b83d7","size":6541,"noattachment":false,"key":"/pug-runtime/-/pug-runtime-3.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/pug-runtime/download/pug-runtime-3.0.1.tgz"},"_npmUser":{"name":"pug-bot","email":"pug-bot@rollingversions.com"},"directories":{},"maintainers":[{"name":"forbeslindesay","email":"forbes@lindesay.co.uk"},{"name":"pug-bot","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pug-runtime_3.0.1_1614540714016_0.20219458972210047"},"_hasShrinkwrap":false,"publish_time":1614540714139,"_cnpm_publish_time":1614540714139},"3.0.1-canary-10":{"name":"pug-runtime","version":"3.0.1-canary-10","description":"The runtime components for the pug templating language","keywords":["pug"],"devDependencies":{"uglify-js":"^2.6.1"},"scripts":{"prepublish":"node prepublish","pretest":"npm run prepublish","build":"node prepublish"},"repository":{"type":"git","url":"https://github.com/pugjs/pug/tree/master/packages/pug-runtime"},"browser":{"fs":false},"author":{"name":"ForbesLindesay"},"license":"MIT","readmeFilename":"README.md","_id":"pug-runtime@3.0.1-canary-10","_nodeVersion":"12.20.2","_npmVersion":"6.14.11","dist":{"shasum":"890e448a1eed2bbcae9b5d8e566ab7cd47680e4c","size":6547,"noattachment":false,"key":"/pug-runtime/-/pug-runtime-3.0.1-canary-10.tgz","tarball":"http://registry.cnpm.dingdandao.com/pug-runtime/download/pug-runtime-3.0.1-canary-10.tgz"},"_npmUser":{"name":"pug-bot","email":"pug-bot@rollingversions.com"},"directories":{},"maintainers":[{"name":"forbeslindesay","email":"forbes@lindesay.co.uk"},{"name":"pug-bot","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pug-runtime_3.0.1-canary-10_1614540632259_0.5675034579855938"},"_hasShrinkwrap":false,"publish_time":1614540632389,"_cnpm_publish_time":1614540632389},"3.0.0":{"name":"pug-runtime","version":"3.0.0","description":"The runtime components for the pug templating language","keywords":["pug"],"devDependencies":{"uglify-js":"^2.6.1"},"scripts":{"prepublish":"node prepublish","pretest":"npm run prepublish","build":"node prepublish"},"repository":{"type":"git","url":"https://github.com/pugjs/pug/tree/master/packages/pug-runtime"},"browser":{"fs":false},"author":{"name":"ForbesLindesay"},"license":"MIT","_id":"pug-runtime@3.0.0","_nodeVersion":"12.16.3","_npmVersion":"6.14.4","dist":{"shasum":"d523025fdc0a1efe70929d1fd3a2d24121ffffb6","size":6456,"noattachment":false,"key":"/pug-runtime/-/pug-runtime-3.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/pug-runtime/download/pug-runtime-3.0.0.tgz"},"maintainers":[{"name":"forbeslindesay","email":"forbes@lindesay.co.uk"},{"name":"pug-bot","email":""}],"_npmUser":{"name":"pug-bot","email":"pug-bot@rollingversions.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pug-runtime_3.0.0_1590409147433_0.5017861084677004"},"_hasShrinkwrap":false,"publish_time":1590409147551,"_cnpm_publish_time":1590409147551},"3.0.0-canary-2":{"name":"pug-runtime","version":"3.0.0-canary-2","description":"The runtime components for the pug templating language","keywords":["pug"],"devDependencies":{"uglify-js":"^2.6.1"},"scripts":{"prepublish":"node prepublish","pretest":"npm run prepublish","build":"node prepublish"},"repository":{"type":"git","url":"https://github.com/pugjs/pug/tree/master/packages/pug-runtime"},"browser":{"fs":false},"author":{"name":"ForbesLindesay"},"license":"MIT","readmeFilename":"README.md","_id":"pug-runtime@3.0.0-canary-2","_nodeVersion":"12.16.3","_npmVersion":"6.14.4","dist":{"shasum":"da86b7845f5597d8ec1669a0520d6d31f8459015","size":6463,"noattachment":false,"key":"/pug-runtime/-/pug-runtime-3.0.0-canary-2.tgz","tarball":"http://registry.cnpm.dingdandao.com/pug-runtime/download/pug-runtime-3.0.0-canary-2.tgz"},"maintainers":[{"name":"forbeslindesay","email":"forbes@lindesay.co.uk"},{"name":"pug-bot","email":""}],"_npmUser":{"name":"pug-bot","email":"pug-bot@rollingversions.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pug-runtime_3.0.0-canary-2_1590409122162_0.8471950643689525"},"_hasShrinkwrap":false,"publish_time":1590409122397,"_cnpm_publish_time":1590409122397},"3.0.0-canary-1":{"name":"pug-runtime","version":"3.0.0-canary-1","description":"The runtime components for the pug templating language","keywords":["pug"],"devDependencies":{"uglify-js":"^2.6.1"},"scripts":{"prepublish":"node prepublish","pretest":"npm run prepublish","build":"node prepublish"},"repository":{"type":"git","url":"https://github.com/pugjs/pug/tree/master/packages/pug-runtime"},"browser":{"fs":false},"author":{"name":"ForbesLindesay"},"license":"MIT","readmeFilename":"README.md","_id":"pug-runtime@3.0.0-canary-1","_nodeVersion":"12.16.3","_npmVersion":"6.14.4","dist":{"shasum":"b4fe04da780dd1165acaa32c5ac6c1faf7824e4d","size":6463,"noattachment":false,"key":"/pug-runtime/-/pug-runtime-3.0.0-canary-1.tgz","tarball":"http://registry.cnpm.dingdandao.com/pug-runtime/download/pug-runtime-3.0.0-canary-1.tgz"},"maintainers":[{"name":"forbeslindesay","email":"forbes@lindesay.co.uk"},{"name":"pug-bot","email":""}],"_npmUser":{"name":"pug-bot","email":"pug-bot@rollingversions.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pug-runtime_3.0.0-canary-1_1590361664389_0.7419930035905624"},"_hasShrinkwrap":false,"publish_time":1590361664505,"_cnpm_publish_time":1590361664505},"2.0.5":{"name":"pug-runtime","version":"2.0.5","description":"The runtime components for the pug templating language","keywords":["pug"],"devDependencies":{"uglify-js":"^2.6.1"},"scripts":{"prepublish":"node prepublish","pretest":"npm run prepublish"},"repository":{"type":"git","url":"https://github.com/pugjs/pug/tree/master/packages/pug-runtime"},"browser":{"fs":false},"author":{"name":"ForbesLindesay"},"license":"MIT","gitHead":"1bdf628a70fda7a0d840c52f3abce54b1c6b0130","_id":"pug-runtime@2.0.5","_nodeVersion":"11.14.0","_npmVersion":"lerna/3.10.8/node@v11.14.0+x64 (darwin)","_npmUser":{"name":"forbeslindesay","email":"forbes@lindesay.co.uk"},"dist":{"shasum":"6da7976c36bf22f68e733c359240d8ae7a32953a","size":6479,"noattachment":false,"key":"/pug-runtime/-/pug-runtime-2.0.5.tgz","tarball":"http://registry.cnpm.dingdandao.com/pug-runtime/download/pug-runtime-2.0.5.tgz"},"maintainers":[{"name":"forbeslindesay","email":"forbes@lindesay.co.uk"},{"name":"pug-bot","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pug-runtime_2.0.5_1560851095151_0.27996222358798906"},"_hasShrinkwrap":false,"publish_time":1560851095288,"_cnpm_publish_time":1560851095288},"2.0.4":{"name":"pug-runtime","version":"2.0.4","description":"The runtime components for the pug templating language","keywords":["pug"],"devDependencies":{"uglify-js":"^2.6.1"},"files":["build.js","index.js","lib/dependencies.js","lib/internals.js","lib/sources.js","wrap.js"],"scripts":{"prepublish":"node prepublish","pretest":"npm run prepublish"},"repository":{"type":"git","url":"https://github.com/pugjs/pug-runtime.git"},"browser":{"fs":false},"author":{"name":"ForbesLindesay"},"license":"MIT","licenseText":"Copyright (c) 2014 Forbes Lindesay\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.","_id":"pug-runtime@2.0.4","dist":{"shasum":"e178e1bda68ab2e8c0acfc9bced2c54fd88ceb58","size":6380,"noattachment":false,"key":"/pug-runtime/-/pug-runtime-2.0.4.tgz","tarball":"http://registry.cnpm.dingdandao.com/pug-runtime/download/pug-runtime-2.0.4.tgz"},"maintainers":[{"name":"forbeslindesay","email":"forbes@lindesay.co.uk"},{"name":"pug-bot","email":""}],"_npmUser":{"name":"forbeslindesay","email":"forbes@lindesay.co.uk"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pug-runtime_2.0.4_1520341947593_0.08521145552869291"},"_hasShrinkwrap":false,"publish_time":1520341947641,"_cnpm_publish_time":1520341947641},"2.0.3":{"name":"pug-runtime","version":"2.0.3","description":"The runtime components for the pug templating language","keywords":["pug"],"dependencies":{},"devDependencies":{"uglify-js":"^2.6.1"},"files":["build.js","index.js","lib/dependencies.js","lib/internals.js","lib/sources.js","wrap.js"],"scripts":{"prepublish":"node prepublish","pretest":"npm run prepublish"},"repository":{"type":"git","url":"git+https://github.com/pugjs/pug-runtime.git"},"browser":{"fs":false},"author":{"name":"ForbesLindesay"},"license":"MIT","bugs":{"url":"https://github.com/pugjs/pug-runtime/issues"},"homepage":"https://github.com/pugjs/pug-runtime#readme","_id":"pug-runtime@2.0.3","_shasum":"98162607b0fce9e254d427f33987a5aee7168bda","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.4.0","_npmUser":{"name":"forbeslindesay","email":"forbes@lindesay.co.uk"},"maintainers":[{"name":"forbeslindesay","email":"forbes@lindesay.co.uk"},{"name":"pug-bot","email":""}],"dist":{"shasum":"98162607b0fce9e254d427f33987a5aee7168bda","size":6324,"noattachment":false,"key":"/pug-runtime/-/pug-runtime-2.0.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/pug-runtime/download/pug-runtime-2.0.3.tgz"},"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/pug-runtime-2.0.3.tgz_1485220037581_0.500715137924999"},"directories":{},"publish_time":1485220039328,"_cnpm_publish_time":1485220039328,"_hasShrinkwrap":false},"2.0.2":{"name":"pug-runtime","version":"2.0.2","description":"The runtime components for the pug templating language","keywords":["pug"],"dependencies":{},"devDependencies":{"istanbul":"*","testit":"^2.0.2","uglify-js":"^2.6.1"},"files":["build.js","index.js","lib/dependencies.js","lib/internals.js","lib/sources.js","wrap.js"],"scripts":{"prepublish":"node prepublish","pretest":"npm run prepublish","test":"node test","posttest":"npm run coverage","coverage":"istanbul cover test"},"repository":{"type":"git","url":"git+https://github.com/pugjs/pug-runtime.git"},"browser":{"fs":false},"author":{"name":"ForbesLindesay"},"license":"MIT","gitHead":"a75aecac638eca85ed78cdbe206ed54077d70316","bugs":{"url":"https://github.com/pugjs/pug-runtime/issues"},"homepage":"https://github.com/pugjs/pug-runtime#readme","_id":"pug-runtime@2.0.2","_shasum":"97331abce339a5436254a7f9b0bd65be11665c21","_from":".","_npmVersion":"3.9.6","_nodeVersion":"6.2.1","_npmUser":{"name":"timothygu","email":"timothygu99@gmail.com"},"dist":{"shasum":"97331abce339a5436254a7f9b0bd65be11665c21","size":5668,"noattachment":false,"key":"/pug-runtime/-/pug-runtime-2.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/pug-runtime/download/pug-runtime-2.0.2.tgz"},"maintainers":[{"name":"forbeslindesay","email":"forbes@lindesay.co.uk"},{"name":"pug-bot","email":""}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/pug-runtime-2.0.2.tgz_1469517162765_0.3221176031511277"},"directories":{},"publish_time":1469517162993,"_cnpm_publish_time":1469517162993,"_hasShrinkwrap":false},"2.0.1":{"name":"pug-runtime","version":"2.0.1","description":"The runtime components for the pug templating language","keywords":["pug"],"dependencies":{},"devDependencies":{"istanbul":"^0.3.5","testit":"^2.0.2","uglify-js":"^2.6.1"},"files":["build.js","index.js","lib/dependencies.js","lib/internals.js","lib/sources.js","wrap.js"],"scripts":{"prepublish":"node prepublish","pretest":"npm run prepublish","test":"node test","posttest":"npm run coverage","coverage":"istanbul cover test"},"repository":{"type":"git","url":"git+https://github.com/pugjs/pug-runtime.git"},"author":{"name":"ForbesLindesay"},"license":"MIT","gitHead":"f42b3efc70712de13264f170328f92796f3f09ef","bugs":{"url":"https://github.com/pugjs/pug-runtime/issues"},"homepage":"https://github.com/pugjs/pug-runtime#readme","_id":"pug-runtime@2.0.1","_shasum":"7cefb8b7c4772a4beca2838051aaf7d36de8c536","_from":".","_npmVersion":"3.8.3","_nodeVersion":"5.10.0","_npmUser":{"name":"timothygu","email":"timothygu99@gmail.com"},"dist":{"shasum":"7cefb8b7c4772a4beca2838051aaf7d36de8c536","size":6317,"noattachment":false,"key":"/pug-runtime/-/pug-runtime-2.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/pug-runtime/download/pug-runtime-2.0.1.tgz"},"maintainers":[{"name":"forbeslindesay","email":"forbes@lindesay.co.uk"},{"name":"pug-bot","email":""}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/pug-runtime-2.0.1.tgz_1460963479980_0.08833538554608822"},"directories":{},"publish_time":1460963480978,"_cnpm_publish_time":1460963480978,"_hasShrinkwrap":false},"2.0.0":{"name":"pug-runtime","version":"2.0.0","description":"The runtime components for the pug templating language","keywords":["pug"],"dependencies":{},"devDependencies":{"istanbul":"^0.3.5","testit":"^2.0.2","uglify-js":"^2.6.1"},"files":["build.js","index.js","lib/dependencies.js","lib/internals.js","lib/sources.js","wrap.js"],"scripts":{"prepublish":"node prepublish","pretest":"npm run prepublish","test":"node test","posttest":"npm run coverage","coverage":"istanbul cover test"},"repository":{"type":"git","url":"https://github.com/pugjs/pug-runtime.git"},"author":{"name":"ForbesLindesay"},"license":"MIT","gitHead":"658832a91a68943ed6d750843042a293d8cae1af","bugs":{"url":"https://github.com/pugjs/pug-runtime/issues"},"homepage":"https://github.com/pugjs/pug-runtime","_id":"pug-runtime@2.0.0","_shasum":"345d0929a11ec6f6057e91ba78e33913ae2a9a9c","_from":".","_npmVersion":"2.7.1","_nodeVersion":"1.6.2","_npmUser":{"name":"forbeslindesay","email":"forbes@lindesay.co.uk"},"dist":{"shasum":"345d0929a11ec6f6057e91ba78e33913ae2a9a9c","size":7480,"noattachment":false,"key":"/pug-runtime/-/pug-runtime-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/pug-runtime/download/pug-runtime-2.0.0.tgz"},"maintainers":[{"name":"forbeslindesay","email":"forbes@lindesay.co.uk"},{"name":"pug-bot","email":""}],"directories":{},"publish_time":1450842846219,"_cnpm_publish_time":1450842846219,"_hasShrinkwrap":false},"0.0.0":{"name":"pug-runtime","version":"0.0.0","description":"The runtime components for the jade templating language","keywords":["jade"],"dependencies":{},"devDependencies":{"istanbul":"^0.3.5","testit":"^2.0.2","uglify-js":"^2.6.1"},"files":["build.js","index.js","lib/dependencies.js","lib/internals.js","lib/sources.js","wrap.js"],"scripts":{"prepublish":"node prepublish","pretest":"npm run prepublish","test":"node test","posttest":"npm run coverage","coverage":"istanbul cover test"},"repository":{"type":"git","url":"https://github.com/jadejs/jade-runtime.git"},"author":{"name":"ForbesLindesay"},"license":"MIT","gitHead":"f6247ca510b88d720b270ce7005b6642acdc7112","bugs":{"url":"https://github.com/jadejs/jade-runtime/issues"},"homepage":"https://github.com/jadejs/jade-runtime","_id":"pug-runtime@0.0.0","_shasum":"f8105094f78ac893cdb19746a7cb0916fd418697","_from":".","_npmVersion":"2.7.1","_nodeVersion":"1.6.2","_npmUser":{"name":"forbeslindesay","email":"forbes@lindesay.co.uk"},"dist":{"shasum":"f8105094f78ac893cdb19746a7cb0916fd418697","size":7495,"noattachment":false,"key":"/pug-runtime/-/pug-runtime-0.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/pug-runtime/download/pug-runtime-0.0.0.tgz"},"maintainers":[{"name":"forbeslindesay","email":"forbes@lindesay.co.uk"},{"name":"pug-bot","email":""}],"directories":{},"publish_time":1449878904038,"_cnpm_publish_time":1449878904038,"_hasShrinkwrap":false}},"readme":"# pug-runtime\n\nThe runtime components for the pug templating language\n\n[![Build Status](https://img.shields.io/travis/pugjs/pug-runtime/master.svg)](https://travis-ci.org/pugjs/pug-runtime)\n[![Dependencies Status](https://david-dm.org/pugjs/pug/status.svg?path=packages/pug-runtime)](https://david-dm.org/pugjs/pug?path=packages/pug-runtime)\n[![DevDependencies Status](https://david-dm.org/pugjs/pug/dev-status.svg?path=packages/pug-runtime)](https://david-dm.org/pugjs/pug?path=packages/pug-runtime&type=dev)\n[![NPM version](https://img.shields.io/npm/v/pug-runtime.svg)](https://www.npmjs.org/package/pug-runtime)\n\n## Installation\n\n    npm install pug-runtime\n\n## Usage\n\n\nYou can call runtime methods directly using `runtime.method`.  This is particularly useful when compiling to deal with things that are already known at compile time.\n\n```js\nvar runtime = require('pug-runtime');\n\nassert(runtime.attr('foo', 'bar', true, true) === ' foo=\"bar\"');\n```\n\nYou can also build a string with a given list of functions available as `pug_method` by calling `build(arrayOfMethods)`.  This is useful for inlining runtime functions within the compiled templates.\n\n```js\nvar build = require('pug-runtime/build');\nvar src = build(['attr']);\n\nvar attr = Function('', src + ';return pug_attr;')();\nassert(attr('foo', 'bar', true, true) === ' foo=\"bar\"');\n```\n\nWhen testing code compiled for the browser in Node.js, it is necessary to make the runtime available. To do so, one can use `require('pug-runtime/wrap')`:\n\n```js\nvar pug = require('pug');\nvar wrap = require('pug-runtime/wrap');\n\nvar pugSrc = 'p= content';\n// By default compileClient automatically embeds the needed runtime functions,\n// rendering this module useless.\nvar compiledCode = pug.compileClient(pugSrc, {\n  externalRuntime: true\n});\n//=> 'function template (locals) { ... pug.escape() ... }'\n\nvar templateFunc = wrap(compiledCode);\ntemplateFunc({content: 'Hey!'});\n//=> '<p>Hey!</p>'\n\n// Change template function name to 'heyTemplate'\ncompiledCode = pug.compileClient(pugSrc, {\n  externalRuntime: true,\n  name: 'heyTemplate'\n});\n//=> 'function heyTemplate (locals) { ... }'\n\ntemplateFunc = wrap(compiledCode, 'heyTemplate');\ntemplateFunc({content: 'Hey!'});\n//=> '<p>Hey!</p>'\n```\n\n\n## License\n\n  MIT\n","_attachments":{},"license":"MIT"}