{"maintainers":[{"name":"ljharb","email":"ljharb@gmail.com"}],"keywords":["javascript","ecmascript","dataview","data","view","byte","length","byteLength","robust"],"dist-tags":{"latest":"1.0.2"},"author":{"name":"Jordan Harband","email":"ljharb@gmail.com"},"_rev":"10","description":"Get the byteLength out of a DataView, robustly.","readme":"# data-view-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 `byteLength` out of a DataView, robustly.\n\nThis will work in node <= 0.10 and < 0.11.4, where there's no prototype accessor, only a nonconfigurable own property.\nIt will also work in modern engines where `DataView.prototype.byteLength` has been deleted after this module has loaded.\n\n## Example\n\n```js\nconst dataViewByteLength = require('data-view-byte-length');\nconst assert = require('assert');\n\nconst ab = new ArrayBuffer(42);\nconst dv = new DataView(ab);\nassert.equal(dataViewByteLength(dv), 42);\n```\n\n## Tests\nSimply clone the repo, `npm install`, and run `npm test`\n\n[package-url]: https://npmjs.org/package/data-view-byte-length\n[npm-version-svg]: https://versionbadg.es/inspect-js/data-view-byte-length.svg\n[deps-svg]: https://david-dm.org/inspect-js/data-view-byte-length.svg\n[deps-url]: https://david-dm.org/inspect-js/data-view-byte-length\n[dev-deps-svg]: https://david-dm.org/inspect-js/data-view-byte-length/dev-status.svg\n[dev-deps-url]: https://david-dm.org/inspect-js/data-view-byte-length#info=devDependencies\n[npm-badge-png]: https://nodei.co/npm/data-view-byte-length.png?downloads=true&stars=true\n[license-image]: https://img.shields.io/npm/l/data-view-byte-length.svg\n[license-url]: LICENSE\n[downloads-image]: https://img.shields.io/npm/dm/data-view-byte-length.svg\n[downloads-url]: https://npm-stat.com/charts.html?package=data-view-byte-length\n[codecov-image]: https://codecov.io/gh/inspect-js/data-view-byte-length/branch/main/graphs/badge.svg\n[codecov-url]: https://app.codecov.io/gh/inspect-js/data-view-byte-length/\n[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/data-view-byte-length\n[actions-url]: https://github.com/inspect-js/data-view-byte-length/actions\n","repository":{"type":"git","url":"git+https://github.com/inspect-js/data-view-byte-length.git"},"bugs":{"url":"https://github.com/inspect-js/data-view-byte-length/issues"},"license":"MIT","versions":{"1.0.0":{"name":"data-view-byte-length","version":"1.0.0","keywords":["javascript","ecmascript","dataview","data","view","byte","length","byteLength","robust"],"author":{"name":"Jordan Harband","email":"ljharb@gmail.com"},"license":"MIT","_id":"data-view-byte-length@1.0.0","maintainers":[{"name":"ljharb","email":"ljharb@gmail.com"}],"homepage":"https://github.com/ljharb/data-view-byte-length#readme","bugs":{"url":"https://github.com/ljharb/data-view-byte-length/issues"},"dist":{"shasum":"4175a04c84d0e3c249be2a5e9e116585c1e83103","tarball":"http://tools.bpmhome.cn:8082/nexus/repository/npm-lc/data-view-byte-length/-/data-view-byte-length-1.0.0.tgz","fileCount":11,"integrity":"sha512-osjbQqFifDjU/RWsmYPwULpkMSNTQs0G36adEntRgFzzo5+ZX+cr84XiawxMqi78d5avv6z88iOk7RScvW0CPw==","signatures":[{"sig":"MEUCIQD9aXYM/ni4vT9hFBJMdr9Q5J+wVIfIN5abOZXndrKO6AIgZliyvp4PADXDNffYUP+w0nLKmBWcVVxjDWBZFnmxatI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":12228},"main":"index.js","types":"./index.d.ts","engines":{"node":">= 0.4"},"exports":{".":"./index.js","./package.json":"./package.json"},"funding":{"url":"https://github.com/sponsors/ljharb"},"gitHead":"4c94a7472507f038c60ff20f089c37a3d4141b7a","scripts":{"lint":"eslint --ext=js,mjs .","test":"npm run tests-only","prelint":"evalmd README.md","prepack":"npmignore --auto --commentLines=autogenerated","pretest":"npm run lint","version":"auto-changelog && git add CHANGELOG.md","postlint":"tsc -p . && attw -P","posttest":"aud --production","prepublish":"not-in-publish || npm run prepublishOnly","tests-only":"nyc tape 'test/**/*.js'","postversion":"auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"","prepublishOnly":"safe-publish-latest"},"_npmUser":{"name":"ljharb","email":"ljharb@gmail.com"},"repository":{"url":"git+https://github.com/ljharb/data-view-byte-length.git","type":"git"},"_npmVersion":"10.2.4","description":"Get the byteLength out of a DataView, robustly.","directories":{},"sideEffects":false,"_nodeVersion":"21.6.2","dependencies":{"call-bind":"^1.0.6","es-errors":"^1.3.0","is-data-view":"^1.0.1"},"publishConfig":{"ignore":[".github/workflows"]},"_hasShrinkwrap":false,"auto-changelog":{"output":"CHANGELOG.md","template":"keepachangelog","hideCredit":true,"unreleased":false,"commitLimit":false,"backfillLimit":false},"devDependencies":{"aud":"^2.0.4","nyc":"^10.3.2","tape":"^5.7.4","eslint":"=8.8.0","evalmd":"^0.0.19","for-each":"^0.3.3","npmignore":"^0.3.1","in-publish":"^2.0.1","typescript":"next","@types/tape":"^5.6.4","auto-changelog":"^2.4.0","object-inspect":"^1.13.1","@types/for-each":"^0.3.3","@types/call-bind":"^1.0.5","es-value-fixtures":"^1.4.2","safe-publish-latest":"^2.0.0","@arethetypeswrong/cli":"^0.15.0","@ljharb/eslint-config":"^21.1.0","@types/object-inspect":"^1.8.4","@types/es-value-fixtures":"^1.4.4"},"_npmOperationalInternal":{"tmp":"tmp/data-view-byte-length_1.0.0_1709572906718_0.14185626943448648","host":"s3://npm-registry-packages"}},"1.0.1":{"name":"data-view-byte-length","version":"1.0.1","keywords":["javascript","ecmascript","dataview","data","view","byte","length","byteLength","robust"],"author":{"name":"Jordan Harband","email":"ljharb@gmail.com"},"license":"MIT","_id":"data-view-byte-length@1.0.1","maintainers":[{"name":"ljharb","email":"ljharb@gmail.com"}],"homepage":"https://github.com/ljharb/data-view-byte-length#readme","bugs":{"url":"https://github.com/ljharb/data-view-byte-length/issues"},"dist":{"shasum":"90721ca95ff280677eb793749fce1011347669e2","tarball":"http://tools.bpmhome.cn:8082/nexus/repository/npm-lc/data-view-byte-length/-/data-view-byte-length-1.0.1.tgz","fileCount":11,"integrity":"sha512-4J7wRJD3ABAzr8wP+OcIcqq2dlUKp4DVflx++hs5h5ZKydWMI6/D/fAot+yh6g2tHh8fLFTvNOaVN357NvSrOQ==","signatures":[{"sig":"MEUCIQCHKTrDH0+iLztKwYBSp0OtqXNTq+iH01IXhCP7J2tBDwIgNqz0LRBNHYneSNkCL2k6p0EL23Hc+2UZHpL8ycRE9i4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":9994},"main":"index.js","types":"./index.d.ts","engines":{"node":">= 0.4"},"exports":{".":"./index.js","./package.json":"./package.json"},"funding":{"url":"https://github.com/sponsors/ljharb"},"gitHead":"430be679859cbcb89f59f0a37bfe17789ec25dab","scripts":{"lint":"eslint --ext=js,mjs .","test":"npm run tests-only","prelint":"evalmd README.md","prepack":"npmignore --auto --commentLines=autogenerated","pretest":"npm run lint","version":"auto-changelog && git add CHANGELOG.md","postlint":"tsc -p . && attw -P","posttest":"aud --production","prepublish":"not-in-publish || npm run prepublishOnly","tests-only":"nyc tape 'test/**/*.js'","postversion":"auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"","prepublishOnly":"safe-publish-latest"},"_npmUser":{"name":"ljharb","email":"ljharb@gmail.com"},"repository":{"url":"git+https://github.com/ljharb/data-view-byte-length.git","type":"git"},"_npmVersion":"10.5.0","description":"Get the byteLength out of a DataView, robustly.","directories":{},"sideEffects":false,"_nodeVersion":"21.7.0","dependencies":{"call-bind":"^1.0.7","es-errors":"^1.3.0","is-data-view":"^1.0.1"},"publishConfig":{"ignore":[".github/workflows"]},"_hasShrinkwrap":false,"auto-changelog":{"output":"CHANGELOG.md","template":"keepachangelog","hideCredit":true,"unreleased":false,"commitLimit":false,"backfillLimit":false},"devDependencies":{"aud":"^2.0.4","nyc":"^10.3.2","tape":"^5.7.5","eslint":"=8.8.0","evalmd":"^0.0.19","for-each":"^0.3.3","npmignore":"^0.3.1","in-publish":"^2.0.1","typescript":"next","@types/tape":"^5.6.4","auto-changelog":"^2.4.0","object-inspect":"^1.13.1","@types/for-each":"^0.3.3","@ljharb/tsconfig":"^0.1.1","@types/call-bind":"^1.0.5","es-value-fixtures":"^1.4.2","safe-publish-latest":"^2.0.0","@arethetypeswrong/cli":"^0.15.1","@ljharb/eslint-config":"^21.1.0","@types/object-inspect":"^1.8.4","@types/es-value-fixtures":"^1.4.4"},"_npmOperationalInternal":{"tmp":"tmp/data-view-byte-length_1.0.1_1709945121548_0.4233907808983357","host":"s3://npm-registry-packages"}},"1.0.2":{"name":"data-view-byte-length","version":"1.0.2","description":"Get the byteLength out of a DataView, robustly.","main":"index.js","exports":{".":"./index.js","./package.json":"./package.json"},"types":"./index.d.ts","sideEffects":false,"scripts":{"prepack":"npmignore --auto --commentLines=autogenerated","prepublishOnly":"safe-publish-latest","prepublish":"not-in-publish || npm run prepublishOnly","prelint":"evalmd README.md","lint":"eslint --ext=js,mjs .","postlint":"tsc -p . && attw -P","pretest":"npm run lint","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)\")\""},"funding":{"url":"https://github.com/sponsors/inspect-js"},"repository":{"type":"git","url":"git+https://github.com/inspect-js/data-view-byte-length.git"},"keywords":["javascript","ecmascript","dataview","data","view","byte","length","byteLength","robust"],"author":{"name":"Jordan Harband","email":"ljharb@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/inspect-js/data-view-byte-length/issues"},"homepage":"https://github.com/inspect-js/data-view-byte-length#readme","dependencies":{"call-bound":"^1.0.3","es-errors":"^1.3.0","is-data-view":"^1.0.2"},"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","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"},"engines":{"node":">= 0.4"},"auto-changelog":{"output":"CHANGELOG.md","template":"keepachangelog","unreleased":false,"commitLimit":false,"backfillLimit":false,"hideCredit":true},"publishConfig":{"ignore":[".github/workflows"]},"_id":"data-view-byte-length@1.0.2","gitHead":"76b05f64f4ecdca09df1a5f9f40501ca903f9bd8","_nodeVersion":"23.5.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-tuhGbE6CfTM9+5ANGf+oQb72Ky/0+s3xKUpHvShfiz2RxMFgFPjsXuRLBVMtvMs15awe45SRb83D6wH4ew6wlQ==","shasum":"9e80f7ca52453ce3e93d25a35318767ea7704735","tarball":"http://tools.bpmhome.cn:8082/nexus/repository/npm-lc/data-view-byte-length/-/data-view-byte-length-1.0.2.tgz","fileCount":11,"unpackedSize":11374,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDIbhFMXVkW+hKo0FybSZ2GjK5SRXtHzzfNBy6zvfI7OQIhAN1N6uk9jI4LQZNFEH7udpxFFLDoZG1ZfVab3K7YhW5s"}]},"_npmUser":{"name":"ljharb","email":"ljharb@gmail.com"},"directories":{},"maintainers":[{"name":"ljharb","email":"ljharb@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/data-view-byte-length_1.0.2_1734670655307_0.2632227815910595"},"_hasShrinkwrap":false}},"name":"data-view-byte-length","time":{"created":"2024-03-04T17:21:46.717Z","modified":"2026-04-17T13:29:07.463Z","1.0.0":"2024-03-04T17:21:46.932Z","1.0.1":"2024-03-09T00:45:21.786Z","1.0.2":"2024-12-20T04:57:35.514Z"},"readmeFilename":"README.md","_id":"data-view-byte-length","homepage":"https://github.com/inspect-js/data-view-byte-length#readme"}