{"_id":"quick-format","_rev":"474198","name":"quick-format","description":"Solves a problem with util.format","dist-tags":{"latest":"2.1.0"},"maintainers":[{"name":"davidmarkclements","email":"huperekchuno@googlemail.com"}],"time":{"modified":"2021-08-05T08:31:08.000Z","created":"2016-03-19T13:10:22.796Z","2.1.0":"2017-03-13T19:30:34.227Z","2.0.6":"2016-10-14T16:26:04.125Z","2.0.5":"2016-10-14T14:53:02.941Z","2.0.4":"2016-04-11T20:26:51.680Z","2.0.3":"2016-04-06T23:37:16.866Z","2.0.2":"2016-04-05T21:02:11.011Z","2.0.1":"2016-04-05T19:01:59.307Z","2.0.0":"2016-03-21T13:38:10.484Z","1.0.1":"2016-03-19T14:08:42.400Z","1.0.0":"2016-03-19T13:10:22.796Z"},"users":{},"author":{"name":"David Mark Clements"},"repository":{"type":"git","url":"git+https://github.com/davidmarkclements/quick-format.git"},"versions":{"2.1.0":{"name":"quick-format","version":"2.1.0","description":"Solves a problem with util.format","main":"index.js","directories":{"test":"test"},"scripts":{"test":"node test"},"author":{"name":"David Mark Clements"},"devDependencies":{"fastbench":"^1.0.1"},"dependencies":{"fast-safe-stringify":"^1.0.8"},"repository":{"type":"git","url":"git+https://github.com/davidmarkclements/quick-format.git"},"keywords":[],"license":"MIT","bugs":{"url":"https://github.com/davidmarkclements/quick-format/issues"},"homepage":"https://github.com/davidmarkclements/quick-format#readme","gitHead":"8743f5d1f28116e7b2cd0116836bd47ea0a8d507","_id":"quick-format@2.1.0","_shasum":"16a8984635c0f0c29fb0ce910de9c5ba57fdc01d","_from":".","_npmVersion":"4.4.1","_nodeVersion":"6.10.0","_npmUser":{"name":"davidmarkclements","email":"huperekchuno@googlemail.com"},"dist":{"shasum":"16a8984635c0f0c29fb0ce910de9c5ba57fdc01d","size":3441,"noattachment":false,"key":"/quick-format/-/quick-format-2.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/quick-format/download/quick-format-2.1.0.tgz"},"maintainers":[{"name":"davidmarkclements","email":"huperekchuno@googlemail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/quick-format-2.1.0.tgz_1489433432115_0.7576386991422623"},"publish_time":1489433434227,"_cnpm_publish_time":1489433434227,"_hasShrinkwrap":false},"2.0.6":{"name":"quick-format","version":"2.0.6","description":"Solves a problem with util.format","main":"index.js","directories":{"test":"test"},"scripts":{"test":"node test"},"author":{"name":"David Mark Clements"},"devDependencies":{"fastbench":"^1.0.1"},"dependencies":{"fast-safe-stringify":"^1.0.8"},"repository":{"type":"git","url":"git+https://github.com/davidmarkclements/quick-format.git"},"keywords":[],"license":"MIT","bugs":{"url":"https://github.com/davidmarkclements/quick-format/issues"},"homepage":"https://github.com/davidmarkclements/quick-format#readme","gitHead":"58626f95dba57928e24086dcd3ab460e66bd8c80","_id":"quick-format@2.0.6","_shasum":"1611f74cbd2ebc19e4b4c653f7ef7f55c4928572","_from":".","_npmVersion":"2.14.17","_nodeVersion":"6.7.0","_npmUser":{"name":"davidmarkclements","email":"huperekchuno@googlemail.com"},"dist":{"shasum":"1611f74cbd2ebc19e4b4c653f7ef7f55c4928572","size":3332,"noattachment":false,"key":"/quick-format/-/quick-format-2.0.6.tgz","tarball":"http://registry.cnpm.dingdandao.com/quick-format/download/quick-format-2.0.6.tgz"},"maintainers":[{"name":"davidmarkclements","email":"huperekchuno@googlemail.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/quick-format-2.0.6.tgz_1476462362959_0.35567505611106753"},"publish_time":1476462364125,"_cnpm_publish_time":1476462364125,"_hasShrinkwrap":false},"2.0.5":{"name":"quick-format","version":"2.0.5","description":"Solves a problem with util.format","main":"index.js","directories":{"test":"test"},"scripts":{"test":"node test"},"author":{"name":"David Mark Clements"},"devDependencies":{"fastbench":"^1.0.1"},"dependencies":{"fast-safe-stringify":"^1.0.8"},"repository":{"type":"git","url":"git+https://github.com/davidmarkclements/quick-format.git"},"keywords":[],"license":"MIT","bugs":{"url":"https://github.com/davidmarkclements/quick-format/issues"},"homepage":"https://github.com/davidmarkclements/quick-format#readme","gitHead":"759f612386b11a38e1c24b3892e0d333ad4a9160","_id":"quick-format@2.0.5","_shasum":"c4004549841dd5ef585cfaf02fe6488e601bdeee","_from":".","_npmVersion":"2.14.17","_nodeVersion":"6.7.0","_npmUser":{"name":"davidmarkclements","email":"huperekchuno@googlemail.com"},"dist":{"shasum":"c4004549841dd5ef585cfaf02fe6488e601bdeee","size":2640,"noattachment":false,"key":"/quick-format/-/quick-format-2.0.5.tgz","tarball":"http://registry.cnpm.dingdandao.com/quick-format/download/quick-format-2.0.5.tgz"},"maintainers":[{"name":"davidmarkclements","email":"huperekchuno@googlemail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/quick-format-2.0.5.tgz_1476456781312_0.7721697026863694"},"publish_time":1476456782941,"_cnpm_publish_time":1476456782941,"_hasShrinkwrap":false},"2.0.4":{"name":"quick-format","version":"2.0.4","description":"Solves a problem with util.format","main":"index.js","directories":{"test":"test"},"scripts":{"test":"node test"},"author":{"name":"David Mark Clements"},"devDependencies":{"fastbench":"^1.0.1"},"dependencies":{"fast-safe-stringify":"^1.0.8"},"gitHead":"13d654e185bc75ad4709f1a1fd7d8114096e2bd1","_id":"quick-format@2.0.4","_shasum":"e0c63fc7c9de694d4561de56f518ba68fdd8094f","_from":".","_npmVersion":"2.14.17","_nodeVersion":"5.10.1","_npmUser":{"name":"davidmarkclements","email":"huperekchuno@googlemail.com"},"dist":{"shasum":"e0c63fc7c9de694d4561de56f518ba68fdd8094f","size":2563,"noattachment":false,"key":"/quick-format/-/quick-format-2.0.4.tgz","tarball":"http://registry.cnpm.dingdandao.com/quick-format/download/quick-format-2.0.4.tgz"},"maintainers":[{"name":"davidmarkclements","email":"huperekchuno@googlemail.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/quick-format-2.0.4.tgz_1460406410347_0.7836144771426916"},"publish_time":1460406411680,"_cnpm_publish_time":1460406411680,"_hasShrinkwrap":false},"2.0.3":{"name":"quick-format","version":"2.0.3","description":"Solves a problem with util.format","main":"index.js","directories":{"test":"test"},"scripts":{"test":"node test"},"author":{"name":"David Mark Clements"},"devDependencies":{"fastbench":"^1.0.1"},"dependencies":{"fast-safe-stringify":"^1.0.8"},"gitHead":"432341eb2157c3eed01ad502a432be0088ddb517","_id":"quick-format@2.0.3","_shasum":"9ebf686ed94867cdd777815fb2ee0aa5e93f782b","_from":".","_npmVersion":"2.14.17","_nodeVersion":"5.10.1","_npmUser":{"name":"davidmarkclements","email":"huperekchuno@googlemail.com"},"dist":{"shasum":"9ebf686ed94867cdd777815fb2ee0aa5e93f782b","size":2494,"noattachment":false,"key":"/quick-format/-/quick-format-2.0.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/quick-format/download/quick-format-2.0.3.tgz"},"maintainers":[{"name":"davidmarkclements","email":"huperekchuno@googlemail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/quick-format-2.0.3.tgz_1459985834721_0.8831034209579229"},"publish_time":1459985836866,"_cnpm_publish_time":1459985836866,"_hasShrinkwrap":false},"2.0.2":{"name":"quick-format","version":"2.0.2","description":"Solves a problem with util.format","main":"index.js","directories":{"test":"test"},"scripts":{"test":"node test"},"author":{"name":"David Mark Clements"},"devDependencies":{"fastbench":"^1.0.1"},"dependencies":{"fast-safe-stringify":"^1.0.4"},"gitHead":"e55cb1e360f2e101c817b05d5de6331ad6e29f97","_id":"quick-format@2.0.2","_shasum":"53a0dc9414c8dffe4cac8f80648ac777936828d5","_from":".","_npmVersion":"2.14.17","_nodeVersion":"5.10.0","_npmUser":{"name":"davidmarkclements","email":"huperekchuno@googlemail.com"},"dist":{"shasum":"53a0dc9414c8dffe4cac8f80648ac777936828d5","size":2495,"noattachment":false,"key":"/quick-format/-/quick-format-2.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/quick-format/download/quick-format-2.0.2.tgz"},"maintainers":[{"name":"davidmarkclements","email":"huperekchuno@googlemail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/quick-format-2.0.2.tgz_1459890128813_0.9897691963706166"},"publish_time":1459890131011,"_cnpm_publish_time":1459890131011,"_hasShrinkwrap":false},"2.0.1":{"name":"quick-format","version":"2.0.1","description":"Solves a problem with util.format","main":"index.js","directories":{"test":"test"},"scripts":{"test":"node test"},"author":{"name":"David Mark Clements"},"devDependencies":{"fastbench":"^1.0.1"},"dependencies":{"fast-safe-stringify":"^1.0.4"},"gitHead":"501c0d5b74ab479694891b000fae74b1e76dcec2","_id":"quick-format@2.0.1","_shasum":"3879bdcac3ba209116a358e1e1e0eb395f018a5f","_from":".","_npmVersion":"2.14.17","_nodeVersion":"5.10.0","_npmUser":{"name":"davidmarkclements","email":"huperekchuno@googlemail.com"},"dist":{"shasum":"3879bdcac3ba209116a358e1e1e0eb395f018a5f","size":2489,"noattachment":false,"key":"/quick-format/-/quick-format-2.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/quick-format/download/quick-format-2.0.1.tgz"},"maintainers":[{"name":"davidmarkclements","email":"huperekchuno@googlemail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/quick-format-2.0.1.tgz_1459882916820_0.14185461308807135"},"publish_time":1459882919307,"_cnpm_publish_time":1459882919307,"_hasShrinkwrap":false},"2.0.0":{"name":"quick-format","version":"2.0.0","description":"Solves a problem with util.format","main":"index.js","directories":{"test":"test"},"scripts":{"test":"node test"},"author":{"name":"David Mark Clements"},"devDependencies":{"fastbench":"^1.0.1"},"dependencies":{"fast-safe-stringify":"^1.0.4"},"gitHead":"238279fff64780ca74ed17687601ff50c0c20e36","_id":"quick-format@2.0.0","_shasum":"518a8df45fc682ea1b4d1fb8cf5670824175b553","_from":".","_npmVersion":"2.14.17","_nodeVersion":"5.9.0","_npmUser":{"name":"davidmarkclements","email":"huperekchuno@googlemail.com"},"dist":{"shasum":"518a8df45fc682ea1b4d1fb8cf5670824175b553","size":2468,"noattachment":false,"key":"/quick-format/-/quick-format-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/quick-format/download/quick-format-2.0.0.tgz"},"maintainers":[{"name":"davidmarkclements","email":"huperekchuno@googlemail.com"}],"_npmOperationalInternal":{"host":"packages-13-west.internal.npmjs.com","tmp":"tmp/quick-format-2.0.0.tgz_1458567488326_0.6842416650615633"},"publish_time":1458567490484,"_cnpm_publish_time":1458567490484,"_hasShrinkwrap":false},"1.0.1":{"name":"quick-format","version":"1.0.1","description":"Solves a problem with util.format in <= Node 5.9","main":"index.js","directories":{"test":"test"},"scripts":{"test":"node test"},"author":{"name":"David Mark Clements"},"devDependencies":{"fastbench":"^1.0.1"},"gitHead":"1d2bab9e0ac523f5df4c88d0242858ea739c1e54","_id":"quick-format@1.0.1","_shasum":"90bea2ea3c0a0d4ff604a0cfbc634e4ea687db35","_from":".","_npmVersion":"2.14.17","_nodeVersion":"5.9.0","_npmUser":{"name":"davidmarkclements","email":"huperekchuno@googlemail.com"},"dist":{"shasum":"90bea2ea3c0a0d4ff604a0cfbc634e4ea687db35","size":2077,"noattachment":false,"key":"/quick-format/-/quick-format-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/quick-format/download/quick-format-1.0.1.tgz"},"maintainers":[{"name":"davidmarkclements","email":"huperekchuno@googlemail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/quick-format-1.0.1.tgz_1458396519950_0.9291046001017094"},"publish_time":1458396522400,"_cnpm_publish_time":1458396522400,"_hasShrinkwrap":false},"1.0.0":{"name":"quick-format","version":"1.0.0","description":"Solves a problem with util.format in <= Node 5.9","main":"index.js","directories":{"test":"test"},"scripts":{"test":"node test"},"author":{"name":"David Mark Clements"},"devDependencies":{"fastbench":"^1.0.1"},"gitHead":"d85299c2293e338bb9dbd35be507f7a7582a3a32","_id":"quick-format@1.0.0","_shasum":"8946c42d714b77632288110aa49d63c44c0c1c79","_from":".","_npmVersion":"2.14.17","_nodeVersion":"5.9.0","_npmUser":{"name":"davidmarkclements","email":"huperekchuno@googlemail.com"},"dist":{"shasum":"8946c42d714b77632288110aa49d63c44c0c1c79","size":2041,"noattachment":false,"key":"/quick-format/-/quick-format-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/quick-format/download/quick-format-1.0.0.tgz"},"maintainers":[{"name":"davidmarkclements","email":"huperekchuno@googlemail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/quick-format-1.0.0.tgz_1458393020625_0.6206005911808461"},"publish_time":1458393022796,"_cnpm_publish_time":1458393022796,"_hasShrinkwrap":false}},"readme":"# quick format\n\nSolves a problem with util.format\n\n## usage\n\n```js\nvar format = require('quick-format')\nvar options = {lowres: false} // <--default\nformat(['hello %s %j %d', 'world', {obj: true}, 4, {another: 'obj'}], options)\n```\n\n## options\n\n### lowres\n\nPassing an options object with `lowres: true` will cause quick-format any object with a circular as a string with the value '\"[Circular]\"'. The default behaviour is to label\ncircular references in an object, instead of abandoning the entire object. Naturally, \n`lowres` is a faster mode, and assumes you have made the decision to ensure the objects\nyou're passing have no circular references.\n\n## caveats\n\nWe use `JSON.stringify` instead of `util.inspect`, this means object\nmethods (functions) *will not be serialized*.\n\n##  util.format\n\nIn `util.format` for Node 5.9, performance is significantly affected\nwhen we pass in more arguments than interpolation characters, e.g\n\n```js\nutil.format('hello %s %j %d', 'world', {obj: true}, 4, {another: 'obj'})\n```\n\nThis is mostly due to the use of `util.inspect`. Use `JSON.stringify`\n(safely) instead which is significantly faster. \n\nIt also takes an array instead of arguments, which helps us \navoid the use of `apply` in some cases.\n\nAlso - for speed purposes, we ignore symbol.\n\n## Benchmarks\n\nWhilst exact matching of objects to interpolation characters is slower,\nthe case of additional objects is 3x faster. Further, using `lowres` mode\nbrings us closer to `util.inspect` speeds.\n\n```\nutil*100000: 205.978ms\nquickLowres*100000: 236.337ms\nquick*100000: 292.018ms\nutilWithTailObj*100000: 1054.592ms\nquickWithTailObjLowres*100000: 267.992ms\nquickWithTailObj*100000: 343.048ms\nutil*100000: 212.011ms\nquickLowres*100000: 226.441ms\nquick*100000: 296.600ms\nutilWithTailObj*100000: 1020.195ms\nquickWithTailObjLowres*100000: 267.331ms\nquickWithTailObj*100000: 343.867ms\n```\n\n## Acknowledgements\n\nSponsored by nearForm\n","_attachments":{},"homepage":"https://github.com/davidmarkclements/quick-format#readme","bugs":{"url":"https://github.com/davidmarkclements/quick-format/issues"},"license":"MIT"}