/
astafievk
/
source_code
Обзор
Документация
Войти
/
astafievk
/
source_code
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
Api/node_modules/mysql/lib/protocol/BufferList.js
24 строки
385 B
astafievK
source code
21 июн 2024, 21:02
21 июн 2024, 21:02
37a1d03
Код
Авторство
О чём код?
module.exports = BufferList; function BufferList() { this.bufs = []; this.size = 0; } BufferList.prototype.shift = function shift() { var buf = this.bufs.shift(); if (buf) { this.size -= buf.length; } return buf; }; BufferList.prototype.push = function push(buf) { if (!buf || !buf.length) { return; } this.bufs.push(buf); this.size += buf.length; };