Skip to content

Instantly share code, notes, and snippets.

@emerleite
Forked from isaacs/require-json.js
Created March 21, 2011 17:03
Show Gist options
  • Save emerleite/879787 to your computer and use it in GitHub Desktop.
Save emerleite/879787 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