Front end of the Slack clone application.

index.js 295B

123456789101112
  1. module.exports = function (source) {
  2. if (this.cacheable) this.cacheable();
  3. var value = typeof source === "string" ? JSON.parse(source) : source;
  4. value = JSON.stringify(value)
  5. .replace(/\u2028/g, '\\u2028')
  6. .replace(/\u2029/g, '\\u2029');
  7. return `module.exports = ${value}`;
  8. }