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

smartbuffer

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

smartbuffer

An auto realloc version of buffer

latest
Source
npmnpm
Version
0.0.1
Version published
Maintainers
1
Created
Source

node-smartbuffer

An auto realloc buffer

#Note

  • buffer will auto realloc with buffer.append method when overflowed.
  • realloc step by power of 2 for example smartbuffer ** [1,,].realloc() make [1,,,] (default is next power of 2) ** [1,,].realloc(5) make [1,,,,,,]

#usage

SmartBuffer = require("smartbuffer").SmartBuffer;
var buf = new SmartBuffer(5);
buf.append("123"); // make ['1','2','3',_,_]  
buf.getFixedBuffer(); // get buffer ['1','2','3'] 
buffer.append("456"); // auto realloc and make ['1','2','3','4','5','6',_,_]

Keywords

buffer

FAQs

Package last updated on 06 Nov 2012

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