index.js 355 B

12345678910
  1. /*
  2. MIT License http://www.opensource.org/licenses/mit-license.php
  3. Author Tobias Koppers @sokra
  4. */
  5. module.exports = function(source) {
  6. this.cacheable && this.cacheable();
  7. var value = typeof source === "string" ? JSON.parse(source) : source;
  8. this.value = [value];
  9. return "module.exports = " + JSON.stringify(value, undefined, "\t") + ";";
  10. }