mirror of
https://github.com/viq/NewsBlur.git
synced 2025-04-13 09:38:09 +00:00
11 lines
295 B
JavaScript
11 lines
295 B
JavaScript
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}`;
|
|
}
|