flush-buffer

1.2.0 • Public • Published

flush-buffer

Buffer that will flush based on time or number of items added

Installation

This module is installed via npm:

$ npm install flush-buffer

Examples

const buffer = new FlushBuffer({flushInterval: 10, maxItems: 1});
buffer.add('bla');
buffer.on('flush', (data) => {
	console.log(data[0]); // bla
});

Dependencies (0)

    Dev Dependencies (7)

    Package Sidebar

    Install

    npm i flush-buffer

    Weekly Downloads

    8

    Version

    1.2.0

    License

    MIT

    Last publish

    Collaborators

    • martinj