UNPKG

@ezs/basics

Version:
18 lines (15 loc) 360 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = exports.writeTo = void 0; const writeTo = function writeTo(stream, data, cb) { if (!stream.write(data)) { stream.once('drain', cb); } else { process.nextTick(cb); } }; exports.writeTo = writeTo; var _default = writeTo; exports.default = _default;