|
||
---|---|---|
.. | ||
alloc-unsafe | ||
ctor | ||
docs/types | ||
from-array | ||
from-arraybuffer | ||
from-buffer | ||
from-string | ||
lib | ||
reviver | ||
to-json | ||
LICENSE | ||
NOTICE | ||
package.json | ||
README.md |
Buffer
Buffer namespace.
Installation
npm install @stdlib/buffer
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 ) );
Notice
This package is part of stdlib, a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more.
For more information on the project, filing bug reports and feature requests, and guidance on how to develop stdlib, see the main project repository.
Community
License
See LICENSE.
Copyright
Copyright © 2016-2021. The Stdlib Authors.