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