5.1.1 • Published 10 months ago

jsinterval v5.1.1

Weekly downloads
-
License
MIT
Repository
-
Last release
10 months ago

JSInterval

Description

JSInterval is a JavaScript library that makes working with intervals easier. It has a simple API and can be used in both Node.js and the browser

Credit

This project makes use of vercel/ms

Installation

Install JSInterval with npm

  npm install jsinterval

Features

  • Works in both Node.js and in the browser
  • Uses ms (Node.js only) to allow strings such as "1 minute", "30s", etc.

Usage/Examples

HTML

<script src="https://cdn.jsdelivr.net/gh/KeithBrown39423/JSInterval/index.js">
<script>
  const timer = new Interval({
    func: () => {
      console.log(Date.now());
    },
    delay: 1000
  });
</script>

JavaScript / TypeScript

const Interval = require("jsinterval");
// TypeScript: import Interval from "jsinterval"; with --esModuleInterop
// TypeScript: import * as Interval from "jsinterval"; with --allowSyntheticDefaultImports
// TypeScript: import Interval = require("jsinterval"); with neither of the above

const timer = new Interval({
  func: () => {
    console.log(Date.now());
  },
  delay: "1 Second"
});

Support

For support, email keithbrown39423@outlook.com or make an issue on GitHub

License

MIT

5.1.1

10 months ago

5.1.0

1 year ago

5.0.0

2 years ago

4.0.0

2 years ago

3.1.2

2 years ago

3.1.1

2 years ago

3.1.0

2 years ago

3.0.0

2 years ago

2.0.0

3 years ago

1.0.11

3 years ago

1.0.10

3 years ago

1.0.9

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago