https://github.com/weisrc/idefer
Defers all instance methods.
https://github.com/weisrc/idefer
Last synced: about 1 month ago
JSON representation
Defers all instance methods.
- Host: GitHub
- URL: https://github.com/weisrc/idefer
- Owner: weisrc
- License: mit
- Created: 2020-11-07T00:17:17.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-07-14T16:14:46.000Z (almost 4 years ago)
- Last Synced: 2025-03-21T08:49:14.162Z (about 2 months ago)
- Language: JavaScript
- Size: 4.88 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# idefer
Defers all instance methods.
## Installation
### Browser
```html
<script/>
```### Node.js
```sh
npm i idefer
``````js
const idefer = require("idefer");
```### Copy paste
Just copy paste the code!
## Usage
```js
let io = new IO();
io.defer = idefer(io);
// all io methods will be added to the defer property.io.defer.close();
// close function is now queued.
// Works with parameters!io.write("Hello");
// do whatever you want here.// executes all the deferred queued functions.
io.defer();
```