diff --git a/dist/1.x/ByteBeat.js b/dist/1.x/ByteBeat.js index 2903496..016ea45 100644 --- a/dist/1.x/ByteBeat.js +++ b/dist/1.x/ByteBeat.js @@ -1,4 +1,4 @@ -/* ByteBeat@1.0.13, license MIT */ +/* ByteBeat@1.0.15, license MIT */ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : typeof define === 'function' && define.amd ? define(factory) : @@ -297,9 +297,7 @@ } static s_fnHeader = (function() { - const keys = { - 'import': true, - }; + const keys = {}; const windowKeep = new Set([ 'parseInt', 'parseFloat', @@ -392,6 +390,7 @@ return Object.prototype.hasOwnProperty.call(obj, p1) ? (name + p1) : str; } x = x.replace(/\bint\b/g, 'floor'); + x = x.replace(/\bimport\b/g, 'notimport'); x = x.replace(/(?:extra\.)?(\w+)/g, function(substr, p1) { return replacer(substr, extra, p1, 'extra.'); }); diff --git a/dist/1.x/ByteBeat.module.js b/dist/1.x/ByteBeat.module.js index c03419e..db4d53f 100644 --- a/dist/1.x/ByteBeat.module.js +++ b/dist/1.x/ByteBeat.module.js @@ -1,4 +1,4 @@ -/* ByteBeat@1.0.13, license MIT */ +/* ByteBeat@1.0.15, license MIT */ class WrappingStack { constructor(stackSize = 256) { let sp = 0; @@ -291,9 +291,7 @@ class ByteBeatCompiler { } static s_fnHeader = (function() { - const keys = { - 'import': true, - }; + const keys = {}; const windowKeep = new Set([ 'parseInt', 'parseFloat', @@ -386,6 +384,7 @@ class ByteBeatCompiler { return Object.prototype.hasOwnProperty.call(obj, p1) ? (name + p1) : str; } x = x.replace(/\bint\b/g, 'floor'); + x = x.replace(/\bimport\b/g, 'notimport'); x = x.replace(/(?:extra\.)?(\w+)/g, function(substr, p1) { return replacer(substr, extra, p1, 'extra.'); }); diff --git a/package-lock.json b/package-lock.json index e8eec90..a0ff2a2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "bytebeat.js", - "version": "1.0.13", + "version": "1.0.15", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "bytebeat.js", - "version": "1.0.13", + "version": "1.0.15", "license": "MIT", "devDependencies": { "eslint": "^8.23.1", diff --git a/package.json b/package.json index d74bb88..1ccbf2c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "bytebeat.js", - "version": "1.0.13", + "version": "1.0.15", "description": "a bytebeat library", "module": "src/ByteBeatNode.js", "scripts": { diff --git a/src/ByteBeatCompiler.js b/src/ByteBeatCompiler.js index e916233..a10dbcb 100644 --- a/src/ByteBeatCompiler.js +++ b/src/ByteBeatCompiler.js @@ -244,9 +244,7 @@ export default class ByteBeatCompiler { } static s_fnHeader = (function() { - const keys = { - 'import': true, - }; + const keys = {}; const windowKeep = new Set([ 'parseInt', 'parseFloat', @@ -339,6 +337,7 @@ export default class ByteBeatCompiler { return Object.prototype.hasOwnProperty.call(obj, p1) ? (name + p1) : str; } x = x.replace(/\bint\b/g, 'floor'); + x = x.replace(/\bimport\b/g, 'notimport'); x = x.replace(/(?:extra\.)?(\w+)/g, function(substr, p1) { return replacer(substr, extra, p1, 'extra.'); });