Skip to content

Instantly share code, notes, and snippets.

@tanepiper
Forked from isaacs/require-json.js
Created March 21, 2011 17:15
Show Gist options
  • Save tanepiper/879810 to your computer and use it in GitHub Desktop.
Save tanepiper/879810 to your computer and use it in GitHub Desktop.
require.extensions[".json"] = function (module, filename) {
module.exports = JSON.parse(require("fs").readFileSync(filename, "utf8"))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment