New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

filo-buffer

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

filo-buffer

Filo fixed size buffer that can be used as a circular buffer

latest
npmnpm
Version
0.0.1
Version published
Maintainers
1
Created
Source

What's filo-buffer?

filo-buffer is a nodejs module that provides a fixed size text buffer implementation.

Installation

The recommended way is through the excellent NPM:

$ npm install filo-buffer

Usage

  • Create a small buffer with a fixed size of 5 characters :
      var b = new FiloBuffer(5); // instanciate the FiloBuffer class
  • Put some data in it :
      b.put('abc');
      b.toString(); // returns the buffer content => 'abc'
  • Same with more data :
      var b = new FiloBuffer(5);
      b.put('abcdefg');
      b.toString(); // => 'cdefg'

As an example, I use it as an alternative of log files in projects. A circular memory buffer limited to 4Kb is enough and no need to rotate, purge generated logs.

Enjoy !

FAQs

Package last updated on 20 May 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts