pikaz-webworker
v0.1.4
Published
A WebWorker Component
Downloads
3
Readme
Introduction
简单封装的webworker插件。
Features
- 开箱即用,函数运行完后自动关闭webworker,减少内存占用。
Installation
With npm or yarn
yarn add pikaz-webworker
npm i -S pikaz-webworker
For Typical use
import worker from 'pikaz-webworker'
const arr = [
{ fuc: () => `函数一运行`, params: [] },
{ fuc: p => `函数${p}运行`, params: ['二'] },
]
worker.run(arr).then(res => {
console.log(res)
})