wallet-core/node_modules/json-loader/index.js

12 lines
295 B
JavaScript
Raw Normal View History

2017-08-14 05:01:11 +02:00
module.exports = function (source) {
if (this.cacheable) this.cacheable();
var value = typeof source === "string" ? JSON.parse(source) : source;
value = JSON.stringify(value)
.replace(/\u2028/g, '\\u2028')
.replace(/\u2029/g, '\\u2029');
return `module.exports = ${value}`;
}