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
});

Readme

Keywords

none

Package Sidebar

Install

npm i flush-buffer

Weekly Downloads

7

Version

1.2.0

License

MIT

Last publish

Collaborators

  • martinj