1.0.0 • Published 5 years ago
idefer v1.0.0
idefer
Defers all instance methods.
Installation
Browser
<script src="https://cdn.jsdelivr.net/npm/idefer"><script/>Node.js
npm i ideferconst 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();1.0.0
5 years ago