interval-buffer-promisified

0.0.3 • Public • Published

interval-buffer-promisified

[Build Status][Coverage Status]Standard - JavaScript Style Guide

Buffers the messages in certain interval as the buffer size allowed.

Install

Install with

npm install interval-buffer-promised --save

Usage

To get started, initialize a new instance with a messageHandler, which will be used to flush the messages after certain interval or when the buffer is full.

var intervalBuff = require('interval-buffer-promisified')({
      messageHandler: log,
      maxBufferSize: 126,
      bufferFlushInterval: 500
})

To pass a message to the interval buffer

intervalBuff.send('sample message')

Readme

Keywords

Package Sidebar

Install

npm i interval-buffer-promisified

Weekly Downloads

0

Version

0.0.3

License

Apache-2.0

Last publish

Collaborators

  • yunwang240