sqlite-worker
Advanced tools
Comparing version 0.6.0 to 0.6.1
@@ -19,3 +19,3 @@ 'use strict'; | ||
db.then((module) => { | ||
module[action].apply(null, [template].concat(values)).then( | ||
module[action](template, ...values).then( | ||
result => { | ||
@@ -22,0 +22,0 @@ postMessage({id, result}); |
@@ -1,1 +0,1 @@ | ||
!function(){"use strict";const{assign:e}=Object,t="function"==typeof importScripts;t||(document.currentScript&&document.currentScript.src||new URL("tmp.js",document.baseURI).href).replace(/\/[^/]*$/,"");const s=s=>new Promise(((o,r)=>{const n=()=>{const e=self.module.exports;delete self.exports,self.module=void 0,o(e)};if(self.exports={},self.module={exports:exports},t)importScripts(s),n();else{const{head:t}=document;e(t.appendChild(document.createElement("script")),{onload(){t.removeChild(this),n()},onerror:r,src:s})}}));let o=null;addEventListener("message",(({data:{id:e,action:t,options:r}})=>{if("init"===t)o||(o=s(r.library).then((({init:e})=>e(r)))),o.then((()=>postMessage({id:e,result:"OK"})),(({message:t})=>postMessage({id:e,error:t})));else{const{template:s,values:n}=r;o.then((o=>{o[t].apply(null,[s].concat(n)).then((t=>{postMessage({id:e,result:t})}),(({message:t})=>{postMessage({id:e,error:t})}))}))}}))}(); | ||
!function(){"use strict";const{assign:e}=Object,t="function"==typeof importScripts;t||(document.currentScript&&document.currentScript.src||new URL("tmp.js",document.baseURI).href).replace(/\/[^/]*$/,"");const s=s=>new Promise(((o,r)=>{const n=()=>{const e=self.module.exports;delete self.exports,self.module=void 0,o(e)};if(self.exports={},self.module={exports:exports},t)importScripts(s),n();else{const{head:t}=document;e(t.appendChild(document.createElement("script")),{onload(){t.removeChild(this),n()},onerror:r,src:s})}}));let o=null;addEventListener("message",(({data:{id:e,action:t,options:r}})=>{if("init"===t)o||(o=s(r.library).then((({init:e})=>e(r)))),o.then((()=>postMessage({id:e,result:"OK"})),(({message:t})=>postMessage({id:e,error:t})));else{const{template:s,values:n}=r;o.then((o=>{o[t](s,...n).then((t=>{postMessage({id:e,result:t})}),(({message:t})=>{postMessage({id:e,error:t})}))}))}}))}(); |
@@ -18,3 +18,3 @@ import {load} from './utils.js'; | ||
db.then((module) => { | ||
module[action].apply(null, [template].concat(values)).then( | ||
module[action](template, ...values).then( | ||
result => { | ||
@@ -21,0 +21,0 @@ postMessage({id, result}); |
{ | ||
"name": "sqlite-worker", | ||
"version": "0.6.0", | ||
"version": "0.6.1", | ||
"description": "A simple, and persistent, SQLite database for Web and Workers", | ||
@@ -5,0 +5,0 @@ "main": "./cjs/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1284479
3