0.1.0 • Published 8 years ago
json-function-loader v0.1.0
json function loader for webpack
Installation
npm install --save json-function-loader
Usage
Wraps json in a function. This allows a pristine object to be returned on each function call. Helpful in testing to prevent mutation affecting unrelated tests.
var json = require("json-function!./file.json")();
// => returns file.json content as json parsed object
Don't forget to polyfill require
if you want to use it in node.
See webpack
documentation.
License
0.1.0
8 years ago