Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion badges/tests-badge.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 8 additions & 2 deletions dist/index-browser-esm.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,10 @@ class Plugins {
* @param {PluginSetup} plugins.init The init function
* @public
*/
register(...plugins) {
register() {
for (var _len = arguments.length, plugins = new Array(_len), _key = 0; _key < _len; _key++) {
plugins[_key] = arguments[_key];
}
plugins.forEach(plugin => {
if (typeof plugin !== 'object' || !plugin.name || !plugin.init) {
throw new Error('Invalid JSEP plugin format');
Expand Down Expand Up @@ -1200,6 +1203,7 @@ const plugin = {
// register plugins
jsep.plugins.register(index, plugin);
jsep.addUnaryOp('typeof');
jsep.addUnaryOp('void');
jsep.addLiteral('null', null);
jsep.addLiteral('undefined', undefined);
const BLOCKED_PROTO_PROPERTIES = new Set(['constructor', '__proto__', '__defineGetter__', '__defineSetter__']);
Expand Down Expand Up @@ -1321,7 +1325,9 @@ const SafeEval = {
'~': a => ~SafeEval.evalAst(a, subs),
// eslint-disable-next-line no-implicit-coercion -- API
'+': a => +SafeEval.evalAst(a, subs),
typeof: a => typeof SafeEval.evalAst(a, subs)
typeof: a => typeof SafeEval.evalAst(a, subs),
// eslint-disable-next-line no-void, sonarjs/void-use -- feature
void: a => void SafeEval.evalAst(a, subs)
}[ast.operator](ast.argument);
return result;
},
Expand Down
2 changes: 1 addition & 1 deletion dist/index-browser-esm.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/index-browser-esm.min.js.map

Large diffs are not rendered by default.

10 changes: 8 additions & 2 deletions dist/index-browser-umd.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,10 @@
* @param {PluginSetup} plugins.init The init function
* @public
*/
register(...plugins) {
register() {
for (var _len = arguments.length, plugins = new Array(_len), _key = 0; _key < _len; _key++) {
plugins[_key] = arguments[_key];
}
plugins.forEach(plugin => {
if (typeof plugin !== 'object' || !plugin.name || !plugin.init) {
throw new Error('Invalid JSEP plugin format');
Expand Down Expand Up @@ -1206,6 +1209,7 @@
// register plugins
jsep.plugins.register(index, plugin);
jsep.addUnaryOp('typeof');
jsep.addUnaryOp('void');
jsep.addLiteral('null', null);
jsep.addLiteral('undefined', undefined);
const BLOCKED_PROTO_PROPERTIES = new Set(['constructor', '__proto__', '__defineGetter__', '__defineSetter__']);
Expand Down Expand Up @@ -1327,7 +1331,9 @@
'~': a => ~SafeEval.evalAst(a, subs),
// eslint-disable-next-line no-implicit-coercion -- API
'+': a => +SafeEval.evalAst(a, subs),
typeof: a => typeof SafeEval.evalAst(a, subs)
typeof: a => typeof SafeEval.evalAst(a, subs),
// eslint-disable-next-line no-void, sonarjs/void-use -- feature
void: a => void SafeEval.evalAst(a, subs)
}[ast.operator](ast.argument);
return result;
},
Expand Down
2 changes: 1 addition & 1 deletion dist/index-browser-umd.min.cjs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/index-browser-umd.min.cjs.map

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion dist/index-node-cjs.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -1204,6 +1204,7 @@ const plugin = {
// register plugins
jsep.plugins.register(index, plugin);
jsep.addUnaryOp('typeof');
jsep.addUnaryOp('void');
jsep.addLiteral('null', null);
jsep.addLiteral('undefined', undefined);
const BLOCKED_PROTO_PROPERTIES = new Set(['constructor', '__proto__', '__defineGetter__', '__defineSetter__']);
Expand Down Expand Up @@ -1325,7 +1326,9 @@ const SafeEval = {
'~': a => ~SafeEval.evalAst(a, subs),
// eslint-disable-next-line no-implicit-coercion -- API
'+': a => +SafeEval.evalAst(a, subs),
typeof: a => typeof SafeEval.evalAst(a, subs)
typeof: a => typeof SafeEval.evalAst(a, subs),
// eslint-disable-next-line no-void, sonarjs/void-use -- feature
void: a => void SafeEval.evalAst(a, subs)
}[ast.operator](ast.argument);
return result;
},
Expand Down
5 changes: 4 additions & 1 deletion dist/index-node-esm.js
Original file line number Diff line number Diff line change
Expand Up @@ -1202,6 +1202,7 @@ const plugin = {
// register plugins
jsep.plugins.register(index, plugin);
jsep.addUnaryOp('typeof');
jsep.addUnaryOp('void');
jsep.addLiteral('null', null);
jsep.addLiteral('undefined', undefined);
const BLOCKED_PROTO_PROPERTIES = new Set(['constructor', '__proto__', '__defineGetter__', '__defineSetter__']);
Expand Down Expand Up @@ -1323,7 +1324,9 @@ const SafeEval = {
'~': a => ~SafeEval.evalAst(a, subs),
// eslint-disable-next-line no-implicit-coercion -- API
'+': a => +SafeEval.evalAst(a, subs),
typeof: a => typeof SafeEval.evalAst(a, subs)
typeof: a => typeof SafeEval.evalAst(a, subs),
// eslint-disable-next-line no-void, sonarjs/void-use -- feature
void: a => void SafeEval.evalAst(a, subs)
}[ast.operator](ast.argument);
return result;
},
Expand Down
1 change: 1 addition & 0 deletions docs/ts/assets/hierarchy.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/ts/assets/icons.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/ts/assets/icons.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 5 additions & 5 deletions docs/ts/assets/main.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/ts/assets/navigation.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/ts/assets/search.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading