1.0.0 • Published 4 years ago

idefer v1.0.0

Weekly downloads
2
License
MIT
Repository
github
Last release
4 years ago

idefer

Defers all instance methods.

Installation

Browser

<script src="https://cdn.jsdelivr.net/npm/idefer"><script/>

Node.js

npm i idefer
const idefer = require("idefer");

Copy paste

Just copy paste the code!

Usage

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.wirte("Hello");
// do whatever you want here.

// executes all the deferred queued functions.
io.defer();