https://github.com/75lb/sleep-anywhere
An isomorphic sleep function you can use anywhere
https://github.com/75lb/sleep-anywhere
Last synced: about 2 months ago
JSON representation
An isomorphic sleep function you can use anywhere
- Host: GitHub
- URL: https://github.com/75lb/sleep-anywhere
- Owner: 75lb
- License: mit
- Created: 2018-09-26T19:17:03.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2024-08-24T14:02:21.000Z (almost 2 years ago)
- Last Synced: 2025-02-14T04:37:13.627Z (over 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 197 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.hbs
- License: LICENSE
Awesome Lists containing this project
README
[](https://www.npmjs.org/package/sleep-anywhere)
[](https://www.npmjs.org/package/sleep-anywhere)
[](https://github.com/75lb/sleep-anywhere/network/dependents?dependent_type=REPOSITORY)
[](https://github.com/75lb/sleep-anywhere/network/dependents?dependent_type=PACKAGE)
[](https://github.com/75lb/sleep-anywhere/actions/workflows/node.js.yml)
[](https://github.com/feross/standard)
{{>main}}
### Load anywhere
This library is compatible with Node.js, the Web and any style of module loader. It can be loaded anywhere, natively without transpilation.
Node.js CommonJS:
```js
const sleep = require('sleep-anywhere')
```
Node.js ECMAScript Module:
```js
import sleep from 'sleep-anywhere'
```
Within a modern browser ECMAScript Module:
```js
import sleep from './node_modules/sleep-anywhere/index.js'
```
* * *
© 2018-24 Lloyd Brookes \<75pound@gmail.com\>.