Buffer
Buffer namespace.
Usage
var ns = require( '@stdlib/buffer' );
ns
Buffer namespace.
var o = ns;
// returns {...}
The namespace contains the following:
allocUnsafe( size )
: allocate a buffer having a specified number of bytes.Buffer()
: Buffer constructor.arraybuffer2buffer( buf[, byteOffset[, length]] )
: allocate a buffer from an ArrayBuffer.copyBuffer( buffer )
: copy buffer data to a newBuffer
instance.string2buffer( str[, encoding] )
: allocate a buffer containing a provided string.reviver( key, value )
: revive a JSON-serialized Buffer.toJSON( buffer )
: return a JSON representation of a Buffer.
Examples
var objectKeys = require( '@stdlib/utils/keys' );
var ns = require( '@stdlib/buffer' );
console.log( objectKeys( ns ) );