{"_id":"array-buffer-byte-length","_rev":"3744961","name":"array-buffer-byte-length","description":"Get the byte length of an ArrayBuffer, even in engines without a `.byteLength` method.","dist-tags":{"latest":"1.0.2"},"maintainers":[{"name":"ljharb","email":""}],"time":{"modified":"2025-02-13T06:28:03.000Z","created":"2023-02-28T20:50:50.182Z","1.0.2":"2024-12-20T01:21:57.597Z","1.0.1":"2024-02-03T23:32:02.101Z","1.0.0":"2023-02-28T20:50:50.182Z"},"users":{},"author":{"name":"Jordan Harband","email":"ljharb@gmail.com"},"repository":{"type":"git","url":"git+https://github.com/inspect-js/array-buffer-byte-length.git"},"versions":{"1.0.2":{"name":"array-buffer-byte-length","version":"1.0.2","description":"Get the byte length of an ArrayBuffer, even in engines without a `.byteLength` method.","main":"index.js","exports":{".":"./index.js","./package.json":"./package.json"},"sideEffects":false,"types":"./index.d.ts","scripts":{"prepack":"npmignore --auto --commentLines=autogenerated","prepublishOnly":"safe-publish-latest","prepublish":"not-in-publish || npm run prepublishOnly","pretest":"npm run lint","prelint":"evalmd README.md","lint":"eslint --ext=js,mjs .","postlint":"tsc && attw -P","tests-only":"nyc tape 'test/**/*.js'","test":"npm run tests-only","posttest":"npx npm@'>= 10.2' audit --production","version":"auto-changelog && git add CHANGELOG.md","postversion":"auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""},"keywords":["shim","polyfill","ArrayBuffer","byteLength","byte","length","es-shim API","es-shims"],"author":{"name":"Jordan Harband","email":"ljharb@gmail.com"},"funding":{"url":"https://github.com/sponsors/ljharb"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/inspect-js/array-buffer-byte-length.git"},"bugs":{"url":"https://github.com/inspect-js/array-buffer-byte-length/issues"},"homepage":"https://github.com/inspect-js/array-buffer-byte-length#readme","dependencies":{"call-bound":"^1.0.3","is-array-buffer":"^3.0.5"},"devDependencies":{"@arethetypeswrong/cli":"^0.17.1","@ljharb/eslint-config":"^21.1.1","@ljharb/tsconfig":"^0.2.2","@types/es-value-fixtures":"^1.4.4","@types/for-each":"^0.3.3","@types/object-inspect":"^1.13.0","@types/tape":"^5.8.0","auto-changelog":"^2.5.0","encoding":"^0.1.13","es-value-fixtures":"^1.5.0","eslint":"=8.8.0","evalmd":"^0.0.19","for-each":"^0.3.3","in-publish":"^2.0.1","npmignore":"^0.3.1","nyc":"^10.3.2","object-inspect":"^1.13.3","safe-publish-latest":"^2.0.0","tape":"^5.9.0","typescript":"next"},"auto-changelog":{"output":"CHANGELOG.md","template":"keepachangelog","unreleased":false,"commitLimit":false,"backfillLimit":false,"hideCredit":true},"testling":{"files":"test/index.js"},"publishConfig":{"ignore":[".github/workflows"]},"engines":{"node":">= 0.4"},"_id":"array-buffer-byte-length@1.0.2","gitHead":"59deea89141b4aeeb64122e5e15efda485942c00","_nodeVersion":"23.5.0","_npmVersion":"10.9.2","dist":{"shasum":"384d12a37295aec3769ab022ad323a18a51ccf8b","size":4891,"noattachment":false,"key":"/array-buffer-byte-length/-/array-buffer-byte-length-1.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/array-buffer-byte-length/download/array-buffer-byte-length-1.0.2.tgz"},"_npmUser":{"name":"ljharb","email":"ljharb@gmail.com"},"directories":{},"maintainers":[{"name":"ljharb","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/array-buffer-byte-length_1.0.2_1734657717417_0.8112415031209577"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2024-12-20T01:21:57.597Z","publish_time":1734657717597,"_source_registry_name":"default","_cnpm_publish_time":1734657717597},"1.0.1":{"name":"array-buffer-byte-length","version":"1.0.1","description":"Get the byte length of an ArrayBuffer, even in engines without a `.byteLength` method.","main":"index.js","exports":{".":"./index.js","./package.json":"./package.json"},"sideEffects":false,"types":"./index.d.ts","scripts":{"prepack":"npmignore --auto --commentLines=autogenerated","prepublishOnly":"safe-publish-latest","prepublish":"not-in-publish || npm run prepublishOnly","pretest":"npm run lint","prelint":"evalmd README.md","lint":"eslint --ext=js,mjs .","postlint":"tsc -p .","tests-only":"nyc tape 'test/**/*.js'","test":"npm run tests-only","posttest":"aud --production","version":"auto-changelog && git add CHANGELOG.md","postversion":"auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""},"keywords":["shim","polyfill","ArrayBuffer","byteLength","byte","length","es-shim API","es-shims"],"author":{"name":"Jordan Harband","email":"ljharb@gmail.com"},"funding":{"url":"https://github.com/sponsors/ljharb"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/inspect-js/array-buffer-byte-length.git"},"bugs":{"url":"https://github.com/inspect-js/array-buffer-byte-length/issues"},"homepage":"https://github.com/inspect-js/array-buffer-byte-length#readme","dependencies":{"call-bind":"^1.0.5","is-array-buffer":"^3.0.4"},"devDependencies":{"@ljharb/eslint-config":"^21.1.0","@types/call-bind":"^1.0.5","@types/es-value-fixtures":"^1.4.4","@types/for-each":"^0.3.3","@types/object-inspect":"^1.8.4","@types/tape":"^5.6.4","aud":"^2.0.4","auto-changelog":"^2.4.0","es-value-fixtures":"^1.4.2","eslint":"=8.8.0","evalmd":"^0.0.19","for-each":"^0.3.3","in-publish":"^2.0.1","npmignore":"^0.3.1","nyc":"^10.3.2","object-inspect":"^1.13.1","safe-publish-latest":"^2.0.0","tape":"^5.7.4","typescript":"^5.4.0-dev.20240202"},"auto-changelog":{"output":"CHANGELOG.md","template":"keepachangelog","unreleased":false,"commitLimit":false,"backfillLimit":false,"hideCredit":true},"testling":{"files":"test/index.js"},"publishConfig":{"ignore":[".github/workflows"]},"engines":{"node":">= 0.4"},"_id":"array-buffer-byte-length@1.0.1","gitHead":"b946a8a8e116c2d1a7d513bb7c5b8ff034437f07","_nodeVersion":"21.6.0","_npmVersion":"10.2.4","dist":{"shasum":"1e5583ec16763540a27ae52eed99ff899223568f","size":5444,"noattachment":false,"key":"/array-buffer-byte-length/-/array-buffer-byte-length-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/array-buffer-byte-length/download/array-buffer-byte-length-1.0.1.tgz"},"_npmUser":{"name":"ljharb","email":"ljharb@gmail.com"},"directories":{},"maintainers":[{"name":"ljharb","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/array-buffer-byte-length_1.0.1_1707003121957_0.34637006364609313"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2024-02-03T23:32:02.101Z","publish_time":1707003122101,"_source_registry_name":"default","_cnpm_publish_time":1707003122101},"1.0.0":{"name":"array-buffer-byte-length","version":"1.0.0","description":"Get the byte length of an ArrayBuffer, even in engines without a `.byteLength` method.","main":"index.js","exports":{".":"./index.js","./package.json":"./package.json"},"scripts":{"prepack":"npmignore --auto --commentLines=autogenerated","prepublishOnly":"safe-publish-latest","prepublish":"not-in-publish || npm run prepublishOnly","pretest":"npm run lint","prelint":"evalmd README.md","lint":"eslint --ext=js,mjs .","tests-only":"nyc tape 'test/**/*.js'","test":"npm run tests-only","posttest":"aud --production","version":"auto-changelog && git add CHANGELOG.md","postversion":"auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""},"keywords":["shim","polyfill","ArrayBuffer","byteLength","byte","length","es-shim API","es-shims"],"author":{"name":"Jordan Harband","email":"ljharb@gmail.com"},"funding":{"url":"https://github.com/sponsors/ljharb"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/inspect-js/array-buffer-byte-length.git"},"bugs":{"url":"https://github.com/inspect-js/array-buffer-byte-length/issues"},"homepage":"https://github.com/inspect-js/array-buffer-byte-length#readme","dependencies":{"call-bind":"^1.0.2","is-array-buffer":"^3.0.1"},"devDependencies":{"@ljharb/eslint-config":"^21.0.1","aud":"^2.0.2","auto-changelog":"^2.4.0","es-value-fixtures":"^1.4.2","eslint":"=8.8.0","evalmd":"^0.0.19","for-each":"^0.3.3","in-publish":"^2.0.1","npmignore":"^0.3.0","nyc":"^10.3.2","object-inspect":"^1.12.3","safe-publish-latest":"^2.0.0","tape":"^5.6.3"},"auto-changelog":{"output":"CHANGELOG.md","template":"keepachangelog","unreleased":false,"commitLimit":false,"backfillLimit":false,"hideCredit":true},"testling":{"files":"test/index.js"},"publishConfig":{"ignore":[".github/workflows"]},"gitHead":"0a880c014f5c635059dc93beae99016e3f9319ce","_id":"array-buffer-byte-length@1.0.0","_nodeVersion":"19.7.0","_npmVersion":"9.5.0","dist":{"shasum":"fabe8bc193fea865f317fe7807085ee0dee5aead","size":3554,"noattachment":false,"key":"/array-buffer-byte-length/-/array-buffer-byte-length-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/array-buffer-byte-length/download/array-buffer-byte-length-1.0.0.tgz"},"_npmUser":{"name":"ljharb","email":"ljharb@gmail.com"},"directories":{},"maintainers":[{"name":"ljharb","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/array-buffer-byte-length_1.0.0_1677617450019_0.841504032980966"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-02-28T20:50:50.182Z","publish_time":1677617450182,"_cnpm_publish_time":1677617450182}},"readme":"# array-buffer-byte-length <sup>[![Version Badge][npm-version-svg]][package-url]</sup>\n\n[![github actions][actions-image]][actions-url]\n[![coverage][codecov-image]][codecov-url]\n[![License][license-image]][license-url]\n[![Downloads][downloads-image]][downloads-url]\n\n[![npm badge][npm-badge-png]][package-url]\n\nGet the byte length of an ArrayBuffer, even in engines without a `.byteLength` method.\n\n## Example\n\n```js\nconst assert = require('assert');\nconst byteLength = require('array-buffer-byte-length');\n\nassert.equal(byteLength([]), NaN, 'an array is not an ArrayBuffer, yields NaN');\n\nassert.equal(byteLength(new ArrayBuffer(0)), 0, 'ArrayBuffer of byteLength 0, yields 0');\n```\n\n## Tests\nSimply clone the repo, `npm install`, and run `npm test`\n\n[package-url]: https://npmjs.org/package/array-buffer-byte-length\n[npm-version-svg]: https://versionbadg.es/inspect-js/array-buffer-byte-length.svg\n[deps-svg]: https://david-dm.org/inspect-js/array-buffer-byte-length.svg\n[deps-url]: https://david-dm.org/inspect-js/array-buffer-byte-length\n[dev-deps-svg]: https://david-dm.org/inspect-js/array-buffer-byte-length/dev-status.svg\n[dev-deps-url]: https://david-dm.org/inspect-js/array-buffer-byte-length#info=devDependencies\n[npm-badge-png]: https://nodei.co/npm/array-buffer-byte-length.png?downloads=true&stars=true\n[license-image]: https://img.shields.io/npm/l/array-buffer-byte-length.svg\n[license-url]: LICENSE\n[downloads-image]: https://img.shields.io/npm/dm/array-buffer-byte-length.svg\n[downloads-url]: https://npm-stat.com/charts.html?package=array-buffer-byte-length\n[codecov-image]: https://codecov.io/gh/inspect-js/array-buffer-byte-length/branch/main/graphs/badge.svg\n[codecov-url]: https://app.codecov.io/gh/inspect-js/array-buffer-byte-length/\n[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/array-buffer-byte-length\n[actions-url]: https://github.com/inspect-js/array-buffer-byte-length/actions\n","_attachments":{},"homepage":"https://github.com/inspect-js/array-buffer-byte-length#readme","bugs":{"url":"https://github.com/inspect-js/array-buffer-byte-length/issues"},"license":"MIT"}