Skip to content

Commit 962e1c4

Browse files
committed
test: coverage
1 parent 6a23f22 commit 962e1c4

9 files changed

Lines changed: 13 additions & 23 deletions

badges/coverage-badge.svg

Lines changed: 1 addition & 1 deletion
Loading

dist/index-browser-esm.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1317,6 +1317,7 @@ const SafeEval = {
13171317
* @returns {UnknownResult}
13181318
*/
13191319
evalBinaryExpression(ast, subs) {
1320+
/* c8 ignore next 3 -- Defensive guard for malformed ASTs */
13201321
if (!Object.hasOwn(BINOPS, ast.operator)) {
13211322
throw new SyntaxError(`Unknown binary operator: ${ast.operator}`);
13221323
}
@@ -1403,6 +1404,7 @@ const SafeEval = {
14031404
* @returns {UnknownResult}
14041405
*/
14051406
evalUnaryExpression(ast, subs) {
1407+
/* c8 ignore next 3 -- Defensive guard for malformed ASTs */
14061408
if (!Object.hasOwn(UNOPS, ast.operator)) {
14071409
throw new SyntaxError(`Unknown unary operator: ${ast.operator}`);
14081410
}
@@ -1479,10 +1481,6 @@ class SafeScript {
14791481
const scriptCache = new Map();
14801482
const pathCache = new Map();
14811483

1482-
/**
1483-
* @import {Script} from './jsonpath-browser.js';
1484-
*/
1485-
14861484
/**
14871485
* @typedef {any} AnyInput
14881486
*/

dist/index-browser-esm.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index-browser-umd.cjs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1323,6 +1323,7 @@
13231323
* @returns {UnknownResult}
13241324
*/
13251325
evalBinaryExpression(ast, subs) {
1326+
/* c8 ignore next 3 -- Defensive guard for malformed ASTs */
13261327
if (!Object.hasOwn(BINOPS, ast.operator)) {
13271328
throw new SyntaxError(`Unknown binary operator: ${ast.operator}`);
13281329
}
@@ -1409,6 +1410,7 @@
14091410
* @returns {UnknownResult}
14101411
*/
14111412
evalUnaryExpression(ast, subs) {
1413+
/* c8 ignore next 3 -- Defensive guard for malformed ASTs */
14121414
if (!Object.hasOwn(UNOPS, ast.operator)) {
14131415
throw new SyntaxError(`Unknown unary operator: ${ast.operator}`);
14141416
}
@@ -1485,10 +1487,6 @@
14851487
const scriptCache = new Map();
14861488
const pathCache = new Map();
14871489

1488-
/**
1489-
* @import {Script} from './jsonpath-browser.js';
1490-
*/
1491-
14921490
/**
14931491
* @typedef {any} AnyInput
14941492
*/

dist/index-browser-umd.min.cjs.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index-node-cjs.cjs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1321,6 +1321,7 @@ const SafeEval = {
13211321
* @returns {UnknownResult}
13221322
*/
13231323
evalBinaryExpression(ast, subs) {
1324+
/* c8 ignore next 3 -- Defensive guard for malformed ASTs */
13241325
if (!Object.hasOwn(BINOPS, ast.operator)) {
13251326
throw new SyntaxError(`Unknown binary operator: ${ast.operator}`);
13261327
}
@@ -1407,6 +1408,7 @@ const SafeEval = {
14071408
* @returns {UnknownResult}
14081409
*/
14091410
evalUnaryExpression(ast, subs) {
1411+
/* c8 ignore next 3 -- Defensive guard for malformed ASTs */
14101412
if (!Object.hasOwn(UNOPS, ast.operator)) {
14111413
throw new SyntaxError(`Unknown unary operator: ${ast.operator}`);
14121414
}
@@ -1483,10 +1485,6 @@ class SafeScript {
14831485
const scriptCache = new Map();
14841486
const pathCache = new Map();
14851487

1486-
/**
1487-
* @import {Script} from './jsonpath-browser.js';
1488-
*/
1489-
14901488
/**
14911489
* @typedef {any} AnyInput
14921490
*/

dist/index-node-esm.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1319,6 +1319,7 @@ const SafeEval = {
13191319
* @returns {UnknownResult}
13201320
*/
13211321
evalBinaryExpression(ast, subs) {
1322+
/* c8 ignore next 3 -- Defensive guard for malformed ASTs */
13221323
if (!Object.hasOwn(BINOPS, ast.operator)) {
13231324
throw new SyntaxError(`Unknown binary operator: ${ast.operator}`);
13241325
}
@@ -1405,6 +1406,7 @@ const SafeEval = {
14051406
* @returns {UnknownResult}
14061407
*/
14071408
evalUnaryExpression(ast, subs) {
1409+
/* c8 ignore next 3 -- Defensive guard for malformed ASTs */
14081410
if (!Object.hasOwn(UNOPS, ast.operator)) {
14091411
throw new SyntaxError(`Unknown unary operator: ${ast.operator}`);
14101412
}
@@ -1481,10 +1483,6 @@ class SafeScript {
14811483
const scriptCache = new Map();
14821484
const pathCache = new Map();
14831485

1484-
/**
1485-
* @import {Script} from './jsonpath-browser.js';
1486-
*/
1487-
14881486
/**
14891487
* @typedef {any} AnyInput
14901488
*/

src/Safe-Script.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,7 @@ const SafeEval = {
160160
* @returns {UnknownResult}
161161
*/
162162
evalBinaryExpression (ast, subs) {
163+
/* c8 ignore next 3 -- Defensive guard for malformed ASTs */
163164
if (!Object.hasOwn(BINOPS, ast.operator)) {
164165
throw new SyntaxError(`Unknown binary operator: ${ast.operator}`);
165166
}
@@ -267,6 +268,7 @@ const SafeEval = {
267268
* @returns {UnknownResult}
268269
*/
269270
evalUnaryExpression (ast, subs) {
271+
/* c8 ignore next 3 -- Defensive guard for malformed ASTs */
270272
if (!Object.hasOwn(UNOPS, ast.operator)) {
271273
throw new SyntaxError(`Unknown unary operator: ${ast.operator}`);
272274
}

src/jsonpath.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,6 @@ import {SafeScript} from './Safe-Script.js';
77
const scriptCache = new Map();
88
const pathCache = new Map();
99

10-
/**
11-
* @import {Script} from './jsonpath-browser.js';
12-
*/
13-
1410
/**
1511
* @typedef {any} AnyInput
1612
*/

0 commit comments

Comments
 (0)