idefer
v1.0.0
Published
Defers all instance methods.
Downloads
2
Readme
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();