Using JS to customize spatial viz and tooltips

(cherry picked from commit df22f29aa49f8e5991e19430aeed816ab08d2dd3)
This commit is contained in:
Maxime Beauchemin
2018-01-04 14:40:16 -08:00
parent 32b466184e
commit b72bf98f68
11 changed files with 194 additions and 45 deletions

View File

@@ -1,6 +1,7 @@
// A safe alternative to JS's eval
import vm from 'vm';
import _ from 'underscore';
import * as colors from './colors';
// Objects exposed here should be treated like a public API
// if `underscore` had backwards incompatible changes in a future release, we'd
@@ -8,6 +9,7 @@ import _ from 'underscore';
const GLOBAL_CONTEXT = {
console,
_,
colors,
};
// Copied/modified from https://github.com/hacksparrow/safe-eval/blob/master/index.js