{"_id":"require-precompiled","_rev":"5-7b0083aba3f4f84690122d84d398fbae","name":"require-precompiled","description":"Require extension that allows for caching/precompiling","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"require-precompiled","version":"0.1.0","description":"Require extension that allows for caching/precompiling","license":"MIT","repository":{"type":"git","url":"git+https://github.com/jamestalmage/require-precompiled.git"},"author":{"name":"James Talmage","email":"james@talmage.io","url":"github.com/jamestalmage"},"engines":{"node":">=0.10.0"},"scripts":{"test":"xo && nyc --reporter=lcov --reporter=text ava"},"files":["index.js"],"keywords":["require","extension","cache","precompile"],"dependencies":{},"devDependencies":{"ava":"^0.8.0","coveralls":"^2.11.6","fake-module-system":"^0.3.0","nyc":"^5.0.0","xo":"^0.12.0"},"xo":{"ignores":["test.js"]},"gitHead":"dcfe0f2c48131a16447c2e45c5bda396b6cb5eca","bugs":{"url":"https://github.com/jamestalmage/require-precompiled/issues"},"homepage":"https://github.com/jamestalmage/require-precompiled#readme","_id":"require-precompiled@0.1.0","_shasum":"5a1b52eb70ebed43eb982e974c85ab59571e56fa","_from":".","_npmVersion":"3.5.2","_nodeVersion":"5.2.0","_npmUser":{"name":"jamestalmage","email":"james@talmage.io"},"dist":{"shasum":"5a1b52eb70ebed43eb982e974c85ab59571e56fa","tarball":"https://registry.npmjs.org/require-precompiled/-/require-precompiled-0.1.0.tgz","integrity":"sha512-UWQr7MdatK8cF0JXrrqVPal2sUdhpCj8f4sC7VMDONA/+WSVv5ElRku3qDEZ+FIqoN91zhhfB+t1P3+qQNaYGQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDOPJtJq5kk7ZikM9zNt+IeKroPAabZ5ph+fAznaSbvfAIgb0wgIjThVq39+70Zemc6UzlX75fl/GBR5gZjnNspZO8="}]},"maintainers":[{"name":"jamestalmage","email":"james@talmage.io"}],"directories":{}}},"readme":"# require-precompiled [![Build Status](https://travis-ci.org/jamestalmage/require-precompiled.svg?branch=master)](https://travis-ci.org/jamestalmage/require-precompiled) [![Coverage Status](https://coveralls.io/repos/jamestalmage/require-precompiled/badge.svg?branch=master&service=github)](https://coveralls.io/github/jamestalmage/require-precompiled?branch=master)\n\n> Require extension that allows for caching/precompiling \n\n\n## Install\n\n```\n$ npm install --save require-precompiled\n```\n\n\n## Usage\n\n```js\nconst installPrecompiler = require('require-precompiled');\nconst cache = require('my-cache-implementation');\n\ninstallPrecompiler(filename => {\n  if (cache.hasEntryFor(filename)) {\n    return cache.getPrecompiledCode(filename);\n  }\n  // fall through to underlying extension chain;\n  return null;\n});\n\n// Any module required from this point on will be checked against the cache.\nconst foo = require('some-module');\n```\n\n\n## API\n\n### requirePrecompiled(callback)\n\n#### callback\n\nType: `Function(string: filename)`\n\nReturn `string` contents for a cache hit, or `null` for a miss.\n\n\n## License\n\nMIT © [James Talmage](http://github.com/jamestalmage)\n","maintainers":[{"email":"james@talmage.io","name":"jamestalmage"}],"time":{"modified":"2022-06-26T11:39:37.343Z","created":"2015-12-16T04:02:45.261Z","0.1.0":"2015-12-16T04:02:45.261Z"},"homepage":"https://github.com/jamestalmage/require-precompiled#readme","keywords":["require","extension","cache","precompile"],"repository":{"type":"git","url":"git+https://github.com/jamestalmage/require-precompiled.git"},"author":{"name":"James Talmage","email":"james@talmage.io","url":"github.com/jamestalmage"},"bugs":{"url":"https://github.com/jamestalmage/require-precompiled/issues"},"license":"MIT","readmeFilename":"readme.md"}