@best/console-stream
Version:
Best stdout stream wrapper
20 lines • 583 B
JavaScript
;
/*
* Copyright (c) 2019, salesforce.com, inc.
* All rights reserved.
* SPDX-License-Identifier: MIT
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = countEOL;
const os_1 = require("os");
function countEOL(buffer) {
let eol_count = 0;
for (let i = 0; i < buffer.length; i++) {
if (buffer[i] === os_1.EOL) {
eol_count += 1;
}
}
return eol_count;
}
//# sourceMappingURL=count-eod.js.map