{"_id":"fr","_rev":"16-1d19bf07e08f6d3cc45a8b956933cb89","name":"fr","description":"tiniest string formatting library","dist-tags":{"latest":"1.2.2"},"versions":{"1.0.0":{"name":"fr","version":"1.0.0","description":"tiny string formatting library","main":"index.js","scripts":{"pretest":"eslint .","test":"node test/index.js"},"repository":{"type":"git","url":"git+https://github.com/m90/fr.git"},"keywords":["string","format"],"author":{"name":"Frederik Ring","email":"frederik.ring@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/m90/fr/issues"},"homepage":"https://github.com/m90/fr#readme","devDependencies":{"eslint":"^1.10.2","tape":"^4.2.2"},"gitHead":"e3947ab86eec1df98f43ca9ee38aedb70c8e10bb","_id":"fr@1.0.0","_shasum":"4a9120098dfc68b0bcfd67c7b79a86f5fd3696e6","_from":".","_npmVersion":"2.14.7","_nodeVersion":"4.2.2","_npmUser":{"name":"m90","email":"frederik.ring@gmail.com"},"dist":{"shasum":"4a9120098dfc68b0bcfd67c7b79a86f5fd3696e6","tarball":"https://registry.npmjs.org/fr/-/fr-1.0.0.tgz","integrity":"sha512-KPMm/4HzD9h+W3NeH9k4EVvnZefNO/DHBbHwxjQqbTffWJ+B00zWnxQdYdvJ/6EtcMCxgArDTpZvnCCcHFjpCg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDnRp3fV2xT3jXG4hflJwNI03eYnUmb1hzDf30Q8XPSJgIhAJaFHnaPtsgK8QoqiuxBf9LA7AHaRH0P3X/rJ0sldcAl"}]},"maintainers":[{"name":"m90","email":"frederik.ring@gmail.com"}],"directories":{}},"1.1.0":{"name":"fr","version":"1.1.0","description":"tiniest string formatting library","main":"index.js","scripts":{"pretest":"eslint .","test":"node test/index.js"},"repository":{"type":"git","url":"git+https://github.com/m90/fr.git"},"keywords":["string","format"],"author":{"name":"Frederik Ring","email":"frederik.ring@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/m90/fr/issues"},"homepage":"https://github.com/m90/fr#readme","devDependencies":{"eslint":"^1.10.2","tape":"^4.2.2"},"gitHead":"77ab41682a39f74f44ffd77397a92491039b7495","_id":"fr@1.1.0","_shasum":"fbf4233490123dc34f1e37ea78e63278a16c84dd","_from":".","_npmVersion":"2.15.1","_nodeVersion":"4.4.4","_npmUser":{"name":"m90","email":"frederik.ring@gmail.com"},"dist":{"shasum":"fbf4233490123dc34f1e37ea78e63278a16c84dd","tarball":"https://registry.npmjs.org/fr/-/fr-1.1.0.tgz","integrity":"sha512-W/KduQBq2vocUFQCPQo6ZBxf/yrmZvRrH/Zb6GpBwEdL6NiWejGweA0kzKYvxlgC4IX4Rt4cKJZfp4NFpbyYLw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDgKiUpt0FdmAiOofaXxRs0BYVtdrgCuWgg07gqN063CAiEAqNmpsLgoK9aIaYoPQELow9obC3syO8Twqquqim/j8Xw="}]},"maintainers":[{"name":"m90","email":"frederik.ring@gmail.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/fr-1.1.0.tgz_1463216996985_0.17862175218760967"},"directories":{}},"1.2.0":{"name":"fr","version":"1.2.0","description":"tiniest string formatting library","main":"index.js","scripts":{"pretest":"eslint .","test":"node test/index.js"},"repository":{"type":"git","url":"git+https://github.com/m90/fr.git"},"keywords":["string","format"],"author":{"name":"Frederik Ring","email":"frederik.ring@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/m90/fr/issues"},"homepage":"https://github.com/m90/fr#readme","devDependencies":{"eslint":"^1.10.2","tape":"^4.2.2"},"gitHead":"add9870174a6c038eff7121b9b98d12b4dd586ee","_id":"fr@1.2.0","_shasum":"81d1cf0f8236838def958e47a736452b7b40199c","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.3.1","_npmUser":{"name":"m90","email":"frederik.ring@gmail.com"},"dist":{"shasum":"81d1cf0f8236838def958e47a736452b7b40199c","tarball":"https://registry.npmjs.org/fr/-/fr-1.2.0.tgz","integrity":"sha512-kCF++HiLtyf20uUTMuX3/8fwkKct3Pnw7mpgjSRV+cei9I7Zjt0H8YolLs/mIuFPZv0uwIuj7V3NXyIGyvrSHQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDA7gyteTulTv9vwNcUil3bPORJfC2qa4t898Eq7H533AiEAreZvWS1EgS3SHx/S1jULXFoogLBf+sz0lJr2IyrBDQU="}]},"maintainers":[{"name":"m90","email":"frederik.ring@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/fr-1.2.0.tgz_1471112672858_0.9371891636401415"},"directories":{}},"1.2.1":{"name":"fr","version":"1.2.1","description":"tiniest string formatting library","main":"index.js","scripts":{"pretest":"eslint .","test":"node test/index.js"},"repository":{"type":"git","url":"git+https://github.com/m90/fr.git"},"keywords":["string","format"],"author":{"name":"Frederik Ring","email":"frederik.ring@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/m90/fr/issues"},"homepage":"https://github.com/m90/fr#readme","devDependencies":{"eslint":"^1.10.2","tape":"^4.2.2"},"gitHead":"fbf5c15c6e56966a16a2034e76df3b5344d66131","_id":"fr@1.2.1","_shasum":"30a5261e7b26bb70037beba4648f775de7af8d55","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.3.1","_npmUser":{"name":"m90","email":"frederik.ring@gmail.com"},"dist":{"shasum":"30a5261e7b26bb70037beba4648f775de7af8d55","tarball":"https://registry.npmjs.org/fr/-/fr-1.2.1.tgz","integrity":"sha512-mzy1mK+qZQbn85FAmBcR3O4rUdJlWcuR7o0q6Msgu5JKLwFMh1s8edD9Ogglkzm/MQQPNfTP228pfIymdntzkA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDGpeQdibJzPUnMWzWJnHxZULWGWOfT9GiPwwSlHQwrkAiBGTZjinu5j9xIdtfe7ZRZLU5by8Rv6X+y6TTsfrlWYbg=="}]},"maintainers":[{"name":"m90","email":"frederik.ring@gmail.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/fr-1.2.1.tgz_1471165764923_0.18155231978744268"},"directories":{}},"1.2.2":{"name":"fr","version":"1.2.2","description":"tiniest string formatting library","main":"index.js","scripts":{"pretest":"eslint .","test":"node test/index.js"},"repository":{"type":"git","url":"git+https://github.com/edelight/fr.git"},"keywords":["string","format"],"author":{"name":"Frederik Ring","email":"frederik.ring@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/edelight/fr/issues"},"homepage":"https://github.com/edelight/fr#readme","devDependencies":{"eslint":"^1.10.2","tape":"^4.2.2"},"gitHead":"92ba494d76e7e64aba35f97e705971eb69ec108e","_id":"fr@1.2.2","_shasum":"3d9d307d8945332bae333dce1e8f6f2d5c03c601","_from":".","_npmVersion":"3.10.8","_nodeVersion":"6.9.0","_npmUser":{"name":"m90","email":"frederik.ring@gmail.com"},"dist":{"shasum":"3d9d307d8945332bae333dce1e8f6f2d5c03c601","tarball":"https://registry.npmjs.org/fr/-/fr-1.2.2.tgz","integrity":"sha512-RekmKscMpU1+baJjbTt1Iba05+/yuEe8v5/5li1irBgGClgQ+u5EqMJH/jDhSCzLvYP+CWTOmJ6bnPqVLaC+Mg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIH9KLyk2bIMsSxph7N/XmdHOmQUecNx0EzUTwK70vBlQAiA2KEO18eli2TrrQWaeayJkDuT4BNjvy8xGluzQLMW9UQ=="}]},"maintainers":[{"name":"m90","email":"frederik.ring@gmail.com"},{"name":"tracdelight","email":"admins@edelight.de"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/fr-1.2.2.tgz_1477471005952_0.22230809298343956"},"directories":{}}},"readme":"# fr\n> tiniest string formatting library\n\n[![Build Status](https://travis-ci.org/edelight/fr.svg?branch=master)](https://travis-ci.org/edelight/fr)\n\n### Installation:\n\nInstall from npm:\n\n```sh\n$ npm install fr --save\n```\n\n### Usage:\n\n#### Index based token replacement:\n\n```js\n// All examples return 'Hello World!'\nfr('Hello {0}!', 'World');\nfr('{0} {1}!', 'Hello', 'World');\nfr('{0} {2}!', 'Hello', 'zalgo', 'World');\nfr('{0} {2}!', 'Hello', { hecomes: 'zalgo' }, 'World');\nfr('{1} {0}{2}', 'World', 'Hello', '!');\nfr('{0}{1}{2}{3}{4}{5}{6}{7}{8}{9}{10}{11}', 'H', 'e', 'l', 'l', 'o', ' ', 'W', 'o', 'r', 'l', 'd', '!');\nfr('{0}{1}{2}{2}{3}{4}{5}{6}{7}{8}{9}{10}', 'H', 'e', 'l', 'o', ' ', 'W', 'o', 'r', 'l', 'd', '!');\n\n```\n\n#### Empty index uses 0:\n\n```js\nfr('Hello {}!', 'World');\nfr('Hello {}{1}', 'World', '!');\n```\n\n#### String tokens and access of nested object properties:\n\n```js\nfr('{greeting} World!', { greeting: 'Hello' });\nfr('{0:greeting} World!', { greeting: 'Hello' });\nfr('{0:data:greeting} World!', { data: { greeting: 'Hello' }});\nfr('{data:greeting} World!', { data: { greeting: 'Hello' }});\nfr('{1:data:greeting}{2}{0}!', 'World', { data: { greeting: 'Hello' }} , ' ');\nfr('{1:data:greeting} {0:thing}!', { thing: 'World' }, { data: { greeting: 'Hello' }});\n```\n\n#### Unknown tokens will not be replaced:\n\n```js\nvar intermediate =  fr('{greeting} {thing}!', {greeting: 'Hello'});\nfr(intermediate, {thing: 'World'});\n```\n\n#### Precompiling:\n\n```js\nvar fn1 = fr('Hello {}!');\nvar fn2 = fr('Hello {}{1}')\nvar fn3 = fr('Hello {thing}{punctuation}');\nfn1('World');\nfn2('World', '!');\nfn3({ thing: 'World', punctuation: '!' });\n```\n\n\n### License\nMIT © [Frederik Ring](http://www.frederikring.com)\n","maintainers":[{"email":"angelangelides@gmail.com","name":"angelbot5000"},{"email":"me@arty.name","name":"arty.name"},{"email":"volodymyr.zhadlun@burda.com","name":"volodymyr.zhadlun"},{"email":"frederik.ring@gmail.com","name":"m90"}],"time":{"modified":"2024-02-12T15:14:52.181Z","created":"2015-11-28T17:18:49.136Z","1.0.0":"2015-11-28T17:18:49.136Z","1.1.0":"2016-05-14T09:09:58.932Z","1.2.0":"2016-08-13T18:24:34.631Z","1.2.1":"2016-08-14T09:09:26.550Z","1.2.2":"2016-10-26T08:36:48.043Z"},"homepage":"https://github.com/edelight/fr#readme","keywords":["string","format"],"repository":{"type":"git","url":"git+https://github.com/edelight/fr.git"},"author":{"name":"Frederik Ring","email":"frederik.ring@gmail.com"},"bugs":{"url":"https://github.com/edelight/fr/issues"},"license":"MIT","readmeFilename":"README.md"}