source: imaps-frontend/node_modules/array-buffer-byte-length/README.md

main
Last change on this file was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago

Update repo after prototype presentation

  • Property mode set to 100644
File size: 1.9 KB
Line 
1# array-buffer-byte-length <sup>[![Version Badge][npm-version-svg]][package-url]</sup>
2
3[![github actions][actions-image]][actions-url]
4[![coverage][codecov-image]][codecov-url]
5[![License][license-image]][license-url]
6[![Downloads][downloads-image]][downloads-url]
7
8[![npm badge][npm-badge-png]][package-url]
9
10Get the byte length of an ArrayBuffer, even in engines without a `.byteLength` method.
11
12## Example
13
14```js
15const assert = require('assert');
16const byteLength = require('array-buffer-byte-length');
17
18assert.equal(byteLength([]), NaN, 'an array is not an ArrayBuffer, yields NaN');
19
20assert.equal(byteLength(new ArrayBuffer(0)), 0, 'ArrayBuffer of byteLength 0, yields 0');
21```
22
23## Tests
24Simply clone the repo, `npm install`, and run `npm test`
25
26[package-url]: https://npmjs.org/package/array-buffer-byte-length
27[npm-version-svg]: https://versionbadg.es/inspect-js/array-buffer-byte-length.svg
28[deps-svg]: https://david-dm.org/inspect-js/array-buffer-byte-length.svg
29[deps-url]: https://david-dm.org/inspect-js/array-buffer-byte-length
30[dev-deps-svg]: https://david-dm.org/inspect-js/array-buffer-byte-length/dev-status.svg
31[dev-deps-url]: https://david-dm.org/inspect-js/array-buffer-byte-length#info=devDependencies
32[npm-badge-png]: https://nodei.co/npm/array-buffer-byte-length.png?downloads=true&stars=true
33[license-image]: https://img.shields.io/npm/l/array-buffer-byte-length.svg
34[license-url]: LICENSE
35[downloads-image]: https://img.shields.io/npm/dm/array-buffer-byte-length.svg
36[downloads-url]: https://npm-stat.com/charts.html?package=array-buffer-byte-length
37[codecov-image]: https://codecov.io/gh/inspect-js/array-buffer-byte-length/branch/main/graphs/badge.svg
38[codecov-url]: https://app.codecov.io/gh/inspect-js/array-buffer-byte-length/
39[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/array-buffer-byte-length
40[actions-url]: https://github.com/inspect-js/array-buffer-byte-length/actions
Note: See TracBrowser for help on using the repository browser.