{"_id":"data-view-byte-length","_rev":"3744965","name":"data-view-byte-length","description":"Get the byteLength out of a DataView, robustly.","dist-tags":{"latest":"1.0.2"},"maintainers":[{"name":"ljharb","email":""}],"time":{"modified":"2025-02-13T06:28:04.000Z","created":"2024-03-04T17:21:46.932Z","1.0.2":"2024-12-20T04:57:35.514Z","1.0.1":"2024-03-09T00:45:21.786Z","1.0.0":"2024-03-04T17:21:46.932Z"},"users":{},"author":{"name":"Jordan Harband","email":"ljharb@gmail.com"},"repository":{"type":"git","url":"git+https://github.com/inspect-js/data-view-byte-length.git"},"versions":{"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":{"shasum":"9e80f7ca52453ce3e93d25a35318767ea7704735","size":4863,"noattachment":false,"key":"/data-view-byte-length/-/data-view-byte-length-1.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/data-view-byte-length/download/data-view-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/data-view-byte-length_1.0.2_1734670655307_0.2632227815910595"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2024-12-20T04:57:35.514Z","publish_time":1734670655514,"_source_registry_name":"default","_cnpm_publish_time":1734670655514},"1.0.1":{"name":"data-view-byte-length","version":"1.0.1","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":"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)\")\""},"funding":{"url":"https://github.com/sponsors/ljharb"},"repository":{"type":"git","url":"git+https://github.com/ljharb/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/ljharb/data-view-byte-length/issues"},"homepage":"https://github.com/ljharb/data-view-byte-length#readme","dependencies":{"call-bind":"^1.0.7","es-errors":"^1.3.0","is-data-view":"^1.0.1"},"devDependencies":{"@arethetypeswrong/cli":"^0.15.1","@ljharb/eslint-config":"^21.1.0","@ljharb/tsconfig":"^0.1.1","@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.5","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.1","gitHead":"430be679859cbcb89f59f0a37bfe17789ec25dab","_nodeVersion":"21.7.0","_npmVersion":"10.5.0","dist":{"shasum":"90721ca95ff280677eb793749fce1011347669e2","size":4453,"noattachment":false,"key":"/data-view-byte-length/-/data-view-byte-length-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/data-view-byte-length/download/data-view-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/data-view-byte-length_1.0.1_1709945121548_0.4233907808983357"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2024-03-09T00:45:21.786Z","publish_time":1709945121786,"_source_registry_name":"default","_cnpm_publish_time":1709945121786},"1.0.0":{"name":"data-view-byte-length","version":"1.0.0","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":"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)\")\""},"funding":{"url":"https://github.com/sponsors/ljharb"},"repository":{"type":"git","url":"git+https://github.com/ljharb/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/ljharb/data-view-byte-length/issues"},"homepage":"https://github.com/ljharb/data-view-byte-length#readme","dependencies":{"call-bind":"^1.0.6","es-errors":"^1.3.0","is-data-view":"^1.0.1"},"devDependencies":{"@arethetypeswrong/cli":"^0.15.0","@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":"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.0","gitHead":"4c94a7472507f038c60ff20f089c37a3d4141b7a","_nodeVersion":"21.6.2","_npmVersion":"10.2.4","dist":{"shasum":"4175a04c84d0e3c249be2a5e9e116585c1e83103","size":5267,"noattachment":false,"key":"/data-view-byte-length/-/data-view-byte-length-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/data-view-byte-length/download/data-view-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/data-view-byte-length_1.0.0_1709572906718_0.14185626943448648"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2024-03-04T17:21:46.932Z","publish_time":1709572906932,"_source_registry_name":"default","_cnpm_publish_time":1709572906932}},"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","_attachments":{},"homepage":"https://github.com/inspect-js/data-view-byte-length#readme","bugs":{"url":"https://github.com/inspect-js/data-view-byte-length/issues"},"license":"MIT"}