A very simple example of es6 module deb.js (opens new window)
import cj from "color-json";
const SkippedKeys = new Set(["start", "end", "raw", "sourceType"]);
const skip = (key, value) => SkippedKeys.has(key)? undefined : value;
const deb = x => cj(JSON.stringify(x, skip, 2));
export default deb;
1
2
3
4
5
6
7
2
3
4
5
6
7