A Function.prototype.once polyfill.
import '@ungap/once';
// require('@ungap/once');
const log = console.log.once().bind(console);
log(1); // logs 1
log(1); // does nothing
Function.prototype.once polyfill
A Function.prototype.once polyfill.
import '@ungap/once';
// require('@ungap/once');
const log = console.log.once().bind(console);
log(1); // logs 1
log(1); // does nothing
Function.prototype.once polyfill