Skip to content

Commit

Permalink
[release] 0.6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Siubaak committed Feb 2, 2025
1 parent df69519 commit 799e4de
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 10 deletions.
18 changes: 15 additions & 3 deletions dist/sval.es6.js
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@
const IMPORT = createSymbol('import');
const EXPORTS = createSymbol('exports');

var version = "0.5.9";
var version = "0.6.0";

class Var {
constructor(kind, value) {
Expand Down Expand Up @@ -1205,7 +1205,13 @@
}
function* SpreadElement$1(node, scope, options = {}) {
const result = yield* evaluate$1(node.argument, scope);
return options.spreadProps ? result : [...result];
if (options.spreadProps) {
return result;
}
if (typeof Symbol === 'function' && typeof result[Symbol.iterator] !== 'function') {
throw new TypeError('Spread syntax requires ...iterable[Symbol.iterator] to be a function');
}
return [...result];
}
function* ChainExpression$1(node, scope) {
return yield* evaluate$1(node.expression, scope);
Expand Down Expand Up @@ -2629,7 +2635,13 @@
}
function SpreadElement(node, scope, options = {}) {
const result = evaluate(node.argument, scope);
return options.spreadProps ? result : [...result];
if (options.spreadProps) {
return result;
}
if (typeof Symbol === 'function' && typeof result[Symbol.iterator] !== 'function') {
throw new TypeError('Spread syntax requires ...iterable[Symbol.iterator] to be a function');
}
return [...result];
}
function ChainExpression(node, scope) {
return evaluate(node.expression, scope);
Expand Down
18 changes: 15 additions & 3 deletions dist/sval.js
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,7 @@
var IMPORT = createSymbol('import');
var EXPORTS = createSymbol('exports');

var version = "0.5.9";
var version = "0.6.0";

var Var = (function () {
function Var(kind, value) {
Expand Down Expand Up @@ -1557,7 +1557,13 @@
case 0: return [5, __values(evaluate$1(node.argument, scope))];
case 1:
result = _a.sent();
return [2, options.spreadProps ? result : __spread(result)];
if (options.spreadProps) {
return [2, result];
}
if (typeof Symbol === 'function' && typeof result[Symbol.iterator] !== 'function') {
throw new TypeError('Spread syntax requires ...iterable[Symbol.iterator] to be a function');
}
return [2, __spread(result)];
}
});
}
Expand Down Expand Up @@ -3527,7 +3533,13 @@
function SpreadElement(node, scope, options) {
if (options === void 0) { options = {}; }
var result = evaluate(node.argument, scope);
return options.spreadProps ? result : __spread(result);
if (options.spreadProps) {
return result;
}
if (typeof Symbol === 'function' && typeof result[Symbol.iterator] !== 'function') {
throw new TypeError('Spread syntax requires ...iterable[Symbol.iterator] to be a function');
}
return __spread(result);
}
function ChainExpression(node, scope) {
return evaluate(node.expression, scope);
Expand Down
2 changes: 1 addition & 1 deletion dist/sval.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sval",
"version": "0.5.9",
"version": "0.6.0",
"description": "A javascript interpreter written in javascript",
"main": "dist/sval.js",
"module": "dist/sval.js",
Expand Down

0 comments on commit 799e4de

Please sign in to comment.