# pureschedule

> pureschedule

Latest version **1.1.9** (published 2020-04-15) · ISC license · 0 weekly downloads

## Install

```sh
npm install pureschedule
pnpm add pureschedule
yarn add pureschedule
bun add pureschedule
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.9 |
| Published | 2020-04-15 |
| First published | 2019-11-01 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 4.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | tvon |
| Maintainers | tvon |
| Keywords | pureschedule |

## Links

- npm: https://www.npmjs.com/package/pureschedule
- npm.io page: https://npm.io/package/pureschedule

## Recent versions

- 1.1.9 (latest) — 2020-04-15
- 1.1.8 — 2020-04-14
- 1.1.7 — 2020-04-14
- 1.1.6 — 2020-04-14
- 1.1.5 — 2020-03-19
- 1.1.4 — 2020-03-19
- 1.1.3 — 2019-12-06
- 1.0.7 — 2019-11-13
- 1.0.6 — 2019-11-02
- 1.0.4 — 2019-11-02
- 1.1.1 — 2019-11-02
- 1.1.0 — 2019-11-02
- 1.0.9 — 2019-11-02
- 1.0.8 — 2019-11-02
- 1.0.3 — 2019-11-01
- … 3 more at https://npm.io/package/pureschedule/versions

## README

## pureschedule

## Installation

```bash
npm install pureschedule
```

## Usage

```html
<script src="pureschedule.js"></script>
<script>
	let schedule = new Pureschedule()
	schedule.add(function () {
		console.log(this) // {wow: 'me'}
	}, {wow: 'me'})
	schedule.start()
</script>
```

```js
import Pureschedule from 'pureschedule'
let schedule = new Pureschedule()
schedule.add(function () {
	console.log(this) // {wow: 'me'}
}, {wow: 'me'}, 1000) // 每隔1秒执行这个函数
schedule.start()

schedule.add(function () {
	console.log(this) // window
}, 1000) // 每隔1秒执行这个函数 
```

#### remove function event

```js
let schedule = new Pureschedule()
let fn = function () {
	console.log(this)
}
let ctx = {wow: 'me'}
schedule.add(fn, ctx)
schedule.start()

setTimeout(function () {
	schedule.remove(fn) // 无效
}, 1200) 

setTimeout(function () {
	schedule.remove(fn, ctx) // 有效
}, 3000)

// or

const f1 = schedule.add(fn, ctx)
schedule.start()
setTimeout(function () {
	f1.destroy()
}, 1200) 
```

---
_Source: https://npm.io/package/pureschedule · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
