{"_id":"fingerprinting","_rev":"4-528b9d2becddfc17c4103744cc26df3c","name":"fingerprinting","description":"Produce a unique string for any given resource, commonly used in cache busting practices.","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.0":{"name":"fingerprinting","version":"1.0.0","description":"Produce a unique string for any given resource, commonly used in cache busting practices.","main":"index.js","scripts":{"100%":"istanbul check-coverage --statements 100 --functions 100 --lines 100 --branches 100","test":"mocha test.js","watch":"mocha --watch test.js","coverage":"istanbul cover ./node_modules/.bin/_mocha -- test.js","test-travis":"istanbul cover node_modules/.bin/_mocha --report lcovonly -- test.js"},"repository":{"type":"git","url":"git+https://github.com/3rd-Eden/fingerprinting.git"},"keywords":["finger","print","fingerprint","fingerprinting","cache","busting","md5","cachebuster","buster","caching"],"author":{"name":"Arnout Kazemier"},"license":"MIT","bugs":{"url":"https://github.com/3rd-Eden/fingerprinting/issues"},"homepage":"https://github.com/3rd-Eden/fingerprinting#readme","pre-commit":["coverage","100%"],"devDependencies":{"assume":"1.2.x","istanbul":"0.3.x","mocha":"2.2.x","pre-commit":"1.0.x"},"gitHead":"bcf3f728447fc17f20c4246349e6100050ac63b3","_id":"fingerprinting@1.0.0","_shasum":"01bff5c0ff66eff6c4b8b58562cfae0039297b9b","_from":".","_npmVersion":"2.9.1","_nodeVersion":"0.12.3","_npmUser":{"name":"3rdeden","email":"npm@3rd-Eden.com"},"maintainers":[{"name":"3rdeden","email":"npm@3rd-Eden.com"}],"dist":{"shasum":"01bff5c0ff66eff6c4b8b58562cfae0039297b9b","tarball":"https://registry.npmjs.org/fingerprinting/-/fingerprinting-1.0.0.tgz","integrity":"sha512-mI2S6ryVX8x2M0dfCKTQ+2vCZHi8cJsmmsMc1MSnTTah7d1vnO0uuaCo0K1ouPann52DAUWKu09PBWGqTlEm3g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDUoek6VpSIWNPks8DLct3lKmCHiimE0aeJucex9AqA/AiEA3nCwuRVLhZM1Rjh+Rh8jUrfcQlpQsA0HRbE3PEDBl9c="}]}},"1.0.1":{"name":"fingerprinting","version":"1.0.1","description":"Produce a unique string for any given resource, commonly used in cache busting practices.","main":"index.js","scripts":{"100%":"istanbul check-coverage --statements 100 --functions 100 --lines 100 --branches 100","test":"mocha test.js","watch":"mocha --watch test.js","coverage":"istanbul cover ./node_modules/.bin/_mocha -- test.js","test-travis":"istanbul cover node_modules/.bin/_mocha --report lcovonly -- test.js"},"repository":{"type":"git","url":"git+https://github.com/3rd-Eden/fingerprinting.git"},"keywords":["finger","print","fingerprint","fingerprinting","cache","busting","md5","cachebuster","buster","caching"],"author":{"name":"Arnout Kazemier"},"license":"MIT","bugs":{"url":"https://github.com/3rd-Eden/fingerprinting/issues"},"homepage":"https://github.com/3rd-Eden/fingerprinting#readme","pre-commit":["coverage","100%"],"devDependencies":{"assume":"1.2.x","istanbul":"0.3.x","mocha":"2.2.x","pre-commit":"1.0.x"},"gitHead":"4322b4ea1f1089d1a4d9360ca8051fab339b80ab","_id":"fingerprinting@1.0.1","_shasum":"675eedcd2355edfb983dc815b2accca9eb980f66","_from":".","_npmVersion":"2.9.1","_nodeVersion":"0.12.3","_npmUser":{"name":"3rdeden","email":"npm@3rd-Eden.com"},"maintainers":[{"name":"3rdeden","email":"npm@3rd-Eden.com"}],"dist":{"shasum":"675eedcd2355edfb983dc815b2accca9eb980f66","tarball":"https://registry.npmjs.org/fingerprinting/-/fingerprinting-1.0.1.tgz","integrity":"sha512-sFZaFZGf7BVg/HP7gtbcKhLPOMCumjfPUA5t14OPDvVRfYDYz4JeQjlLt9t+P6c/9OqzJZVyQ7ZMODKpM7J+dw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHSalplZQFCCRD3M2Nm5SEB5qK+6e9NX+5bAFUmyouBUAiEAo57KkrkduAI/l/X5JJqgb9H5bXSq/FxAo1/cT4L5A+o="}]}}},"readme":"# fingerprinting\n\n[![Version npm][version]](http://browsenpm.org/package/fingerprinting)[![Build Status][build]](https://travis-ci.org/3rd-Eden/fingerprinting)[![Dependencies][david]](https://david-dm.org/3rd-Eden/fingerprinting)[![Coverage Status][cover]](https://coveralls.io/r/3rd-Eden/fingerprinting?branch=master)\n\n[version]: https://img.shields.io/npm/v/fingerprinting.svg?style=flat-square\n[build]: https://img.shields.io/travis/3rd-Eden/fingerprinting/master.svg?style=flat-square\n[david]: https://img.shields.io/david/3rd-Eden/fingerprinting.svg?style=flat-square\n[cover]: https://img.shields.io/coveralls/3rd-Eden/fingerprinting/master.svg?style=flat-square\n\nFingerprinting is a cache-busting technique which allows you to expire files\nwhen they actually change this is done by altering the filenames of the files.\nThis way you can set far future expire headers without having to worry that your\nusers might see stale or old files. Providing you with best of 2 worlds, cached\nassets for increased performance with sacrificing your ability to instantly\nmodify files.\n\n## Installation\n\nThe module is released in the public npm registry and can be installed by\nrunning:\n\n```\nnpm install --save fingerprinting\n```\n\n## Usage\n\nThe `fingerprinting` module is exposed as a single function that generates the\nnew filenames for your files. In all examples we assume that you've already\nrequired the module as followed;\n\n```js\n'use strict';\n\nvar finger = require('fingerprinting');\n```\n\nThe exported `finger` function accepts the following arguments:\n\n- **file** The path to the file or filename of the file where we're generating\n  the file from. This is used to extract the file extension and read the file\n  contents if no `contents` option is provided (please do note that reading is\n  done using a *sync* fs method).\n- **options** Optional configuration for the fingerprint generation:\n  - **format**: Template that specifies the format of the generated fingerprint.\n    Defaults to `{hash}.{suffix}.{ext}`.\n  - **algorithm** Hashing algorithm to be used to generate source hash. Defaults\n    to `md5`.\n  - **map** Also generate an unique id for source maps. Defaults to `false`.\n  - **env** Environment that we're generating it for. It is used to generate the\n    suffix in the filename format. For example `production` generates a `min`\n    suffix while a mising or development generates a `dev` suffix. Defaults to\n    `NODE_ENV`.\n  - **content** The actual content of the filename. This eliminates the need to\n    do a `fs.readFileSync` within the code. It can be either a string or Buffer.\n\nThe function returns an object with 2 keys:\n\n- **file** This is the new filename for the given file.\n- **map** If the *map* option was set to `true` this will contain the filename\n  for your source map file.\n\n#### Example\n\n```js\nvar fs = require('fs');\n\nfs.readFile(__dirname + '/index.js', function (err, buffer) {\n  if (err) throw err;\n\n  var print = finger('index.js', {\n    content: buffer\n  });\n\n  console.log('print:', print.file); // 167f581dd914ba9d3d2e6c8820a5caa6.dev.js\n});\n```\n\n## License\n\nMIT\n","maintainers":[{"name":"3rdeden","email":"npm@3rd-Eden.com"}],"time":{"modified":"2022-06-18T00:59:03.676Z","created":"2015-07-28T09:24:15.533Z","1.0.0":"2015-07-28T09:24:15.533Z","1.0.1":"2015-08-07T14:06:56.137Z"},"homepage":"https://github.com/3rd-Eden/fingerprinting#readme","keywords":["finger","print","fingerprint","fingerprinting","cache","busting","md5","cachebuster","buster","caching"],"repository":{"type":"git","url":"git+https://github.com/3rd-Eden/fingerprinting.git"},"author":{"name":"Arnout Kazemier"},"bugs":{"url":"https://github.com/3rd-Eden/fingerprinting/issues"},"license":"MIT","readmeFilename":"README.md"}