{"_id":"typed-array-byte-length","_rev":"3-8978df9b9918e9364a3733b8da81c3ce","name":"typed-array-byte-length","dist-tags":{"latest":"1.0.3"},"versions":{"1.0.0":{"name":"typed-array-byte-length","version":"1.0.0","keywords":["typed","array","byteLength","byte","length","robust","es","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array","BigInt64Array","BigUint64Array"],"author":{"name":"Jordan Harband","email":"ljharb@gmail.com"},"license":"MIT","_id":"typed-array-byte-length@1.0.0","maintainers":[{"name":"ljharb","email":"ljharb@gmail.com"}],"homepage":"https://github.com/inspect-js/typed-array-byte-length#readme","bugs":{"url":"https://github.com/inspect-js/typed-array-byte-length/issues"},"dist":{"shasum":"d787a24a995711611fb2b87a4052799517b230d0","tarball":"https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.0.tgz","fileCount":9,"integrity":"sha512-Or/+kvLxNpeQ9DtSydonMxCx+9ZXOswtwJn17SNLvhptaXYDJvkFFP5zbfU/uLmvnBJlI4yrnXRxpdWH/M5tNA==","signatures":[{"sig":"MEUCIQDEn4E/HPm1v5FNmaKXmZMNben2OOMXVD2BLH/jmC82WwIgXIU5uFCnHEmMkzUs23d5VEIf9Ja0l555+GZrJoxeTzw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":13711},"main":"index.js","engines":{"node":">= 0.4"},"exports":{".":"./index.js","./package.json":"./package.json"},"funding":{"url":"https://github.com/sponsors/ljharb"},"gitHead":"8298313986fa9b614e8e4b6da0b4fb0279b18a8e","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","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"},"testling":{"files":"test/index.js"},"repository":{"url":"git+https://github.com/inspect-js/typed-array-byte-length.git","type":"git"},"_npmVersion":"9.7.2","description":"Robustly get the byte length of a Typed Array","directories":{},"_nodeVersion":"20.4.0","dependencies":{"for-each":"^0.3.3","call-bind":"^1.0.2","has-proto":"^1.0.1","is-typed-array":"^1.1.10"},"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.2","nyc":"^10.3.2","tape":"^5.6.3","eslint":"=8.8.0","evalmd":"^0.0.19","npmignore":"^0.3.0","in-publish":"^2.0.1","is-callable":"^1.2.7","auto-changelog":"^2.4.0","object-inspect":"^1.12.3","make-arrow-function":"^1.2.0","safe-publish-latest":"^2.0.0","@ljharb/eslint-config":"^21.1.0","available-typed-arrays":"^1.0.5","make-generator-function":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/typed-array-byte-length_1.0.0_1689371350740_0.7969543909046957","host":"s3://npm-registry-packages"}},"1.0.1":{"name":"typed-array-byte-length","version":"1.0.1","keywords":["typed","array","byteLength","byte","length","robust","es","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array","BigInt64Array","BigUint64Array"],"author":{"name":"Jordan Harband","email":"ljharb@gmail.com"},"license":"MIT","_id":"typed-array-byte-length@1.0.1","maintainers":[{"name":"ljharb","email":"ljharb@gmail.com"}],"homepage":"https://github.com/inspect-js/typed-array-byte-length#readme","bugs":{"url":"https://github.com/inspect-js/typed-array-byte-length/issues"},"dist":{"shasum":"d92972d3cff99a3fa2e765a28fcdc0f1d89dec67","tarball":"https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.1.tgz","fileCount":11,"integrity":"sha512-3iMJ9q0ao7WE9tWcaYKIptkNBuOIcZCCT0d4MRvuuH88fEoEH62IuQe0OtraD3ebQEoTRk8XCBoknUNc1Y67pw==","signatures":[{"sig":"MEUCIGbASzxYLMTbUGItDmcpopxuo5osJelS9J+CCrSuyiO9AiEAzgw5jn9cMMUdA24mZqTUQFayRMahVhMyNDCkXQamZT4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":20047},"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":"e0b419e4f31079c8847ba85dad078e587a18973f","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 .","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"},"testling":{"files":"test/index.js"},"repository":{"url":"git+https://github.com/inspect-js/typed-array-byte-length.git","type":"git"},"_npmVersion":"10.2.4","description":"Robustly get the byte length of a Typed Array","directories":{},"sideEffects":false,"_nodeVersion":"21.6.2","dependencies":{"gopd":"^1.0.1","for-each":"^0.3.3","call-bind":"^1.0.7","has-proto":"^1.0.3","is-typed-array":"^1.1.13"},"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","npmignore":"^0.3.1","in-publish":"^2.0.1","typescript":"next","@types/gopd":"^1.0.3","@types/tape":"^5.6.4","is-callable":"^1.2.7","auto-changelog":"^2.4.0","object-inspect":"^1.13.1","@types/for-each":"^0.3.3","@types/call-bind":"^1.0.5","@types/is-callable":"^1.1.2","make-arrow-function":"^1.2.0","safe-publish-latest":"^2.0.0","@ljharb/eslint-config":"^21.1.0","@types/object-inspect":"^1.8.4","available-typed-arrays":"^1.0.7","make-generator-function":"^2.0.0","@types/make-arrow-function":"^1.2.2","@types/make-generator-function":"^2.0.3"},"_npmOperationalInternal":{"tmp":"tmp/typed-array-byte-length_1.0.1_1708499455091_0.16769186878462072","host":"s3://npm-registry-packages"}},"1.0.2":{"name":"typed-array-byte-length","version":"1.0.2","keywords":["typed","array","byteLength","byte","length","robust","es","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array","BigInt64Array","BigUint64Array"],"author":{"name":"Jordan Harband","email":"ljharb@gmail.com"},"license":"MIT","_id":"typed-array-byte-length@1.0.2","maintainers":[{"name":"ljharb","email":"ljharb@gmail.com"}],"homepage":"https://github.com/inspect-js/typed-array-byte-length#readme","bugs":{"url":"https://github.com/inspect-js/typed-array-byte-length/issues"},"dist":{"shasum":"6e30b672a4192fdb7476c3b2191b860c62129434","tarball":"https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.2.tgz","fileCount":11,"integrity":"sha512-adiFrvWBKqevPpbl+LErGnoS7juikX0VLSK+s4rcUEqAv2gClx0DB/g0gMUQXMZiG2RhUDUFgQpyXta4AKG9VA==","signatures":[{"sig":"MEUCIQChcL/OQnm7ol/T7uxL3HGJ90XqcrFG5z84jrFva4feSgIgehI9CzDEM8BoBmOWA7O8oyPcVpxoqTpBDLi48MQO4bk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":18146},"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":"713940c84f35d6125998a058fd2f23be4b1b43f4","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":"npx npm@'>= 10.2' audit --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"},"testling":{"files":"test/index.js"},"repository":{"url":"git+https://github.com/inspect-js/typed-array-byte-length.git","type":"git"},"_npmVersion":"10.9.2","description":"Robustly get the byte length of a Typed Array","directories":{},"sideEffects":false,"_nodeVersion":"23.4.0","dependencies":{"gopd":"^1.2.0","for-each":"^0.3.3","call-bind":"^1.0.8","has-proto":"^1.2.0","is-typed-array":"^1.1.14"},"publishConfig":{"ignore":[".github/workflows"]},"_hasShrinkwrap":false,"auto-changelog":{"output":"CHANGELOG.md","template":"keepachangelog","hideCredit":true,"unreleased":false,"commitLimit":false,"backfillLimit":false},"devDependencies":{"nyc":"^10.3.2","tape":"^5.9.0","eslint":"=8.8.0","evalmd":"^0.0.19","encoding":"^0.1.13","npmignore":"^0.3.1","in-publish":"^2.0.1","typescript":"next","@types/gopd":"^1.0.3","@types/tape":"^5.7.0","is-callable":"^1.2.7","auto-changelog":"^2.5.0","object-inspect":"^1.13.3","@types/for-each":"^0.3.3","@ljharb/tsconfig":"^0.2.2","@types/call-bind":"^1.0.5","@types/is-callable":"^1.1.2","make-arrow-function":"^1.2.0","safe-publish-latest":"^2.0.0","@arethetypeswrong/cli":"^0.17.1","@ljharb/eslint-config":"^21.1.1","@types/object-inspect":"^1.13.0","available-typed-arrays":"^1.0.7","make-generator-function":"^2.0.0","@types/make-arrow-function":"^1.2.2","@types/make-generator-function":"^2.0.3"},"_npmOperationalInternal":{"tmp":"tmp/typed-array-byte-length_1.0.2_1734466712890_0.3479111119945264","host":"s3://npm-registry-packages-npm-production"}},"1.0.3":{"name":"typed-array-byte-length","version":"1.0.3","description":"Robustly get the byte length of a Typed Array","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","pretest":"npm run lint","prelint":"evalmd README.md","lint":"eslint --ext=js,mjs .","postlint":"tsc -p . && 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)\")\""},"repository":{"type":"git","url":"git+https://github.com/inspect-js/typed-array-byte-length.git"},"keywords":["typed","array","byteLength","byte","length","robust","es","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array","BigInt64Array","BigUint64Array"],"author":{"name":"Jordan Harband","email":"ljharb@gmail.com"},"funding":{"url":"https://github.com/sponsors/ljharb"},"license":"MIT","bugs":{"url":"https://github.com/inspect-js/typed-array-byte-length/issues"},"homepage":"https://github.com/inspect-js/typed-array-byte-length#readme","dependencies":{"call-bind":"^1.0.8","for-each":"^0.3.3","gopd":"^1.2.0","has-proto":"^1.2.0","is-typed-array":"^1.1.14"},"devDependencies":{"@arethetypeswrong/cli":"^0.17.1","@ljharb/eslint-config":"^21.1.1","@ljharb/tsconfig":"^0.2.2","@types/call-bind":"^1.0.5","@types/for-each":"^0.3.3","@types/gopd":"^1.0.3","@types/is-callable":"^1.1.2","@types/make-arrow-function":"^1.2.2","@types/make-generator-function":"^2.0.3","@types/object-inspect":"^1.13.0","@types/tape":"^5.7.0","auto-changelog":"^2.5.0","available-typed-arrays":"^1.0.7","encoding":"^0.1.13","eslint":"=8.8.0","evalmd":"^0.0.19","in-publish":"^2.0.1","is-callable":"^1.2.7","make-arrow-function":"^1.2.0","make-generator-function":"^2.0.0","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},"testling":{"files":"test/index.js"},"publishConfig":{"ignore":[".github/workflows"]},"_id":"typed-array-byte-length@1.0.3","gitHead":"e8e0b5b1625b45fca47eea2931f8b9185fa19da1","_nodeVersion":"23.4.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-BaXgOuIxz8n8pIq3e7Atg/7s+DpiYrxn4vdot3w9KbnBhcRQq6o3xemQdIfynqSeXeDrF32x+WvfzmOjPiY9lg==","shasum":"8407a04f7d78684f3d252aa1a143d2b77b4160ce","tarball":"https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.3.tgz","fileCount":11,"unpackedSize":18443,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDvGhEwV0L0g2WFCaY320o2O6TjI/2elqq/M/IPDer+kAiA2XYP0jbYfeYod1/hVnEIS6e737fw1FYOFa4/z/ar5lw=="}]},"_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/typed-array-byte-length_1.0.3_1734474792734_0.13722164026201256"},"_hasShrinkwrap":false}},"time":{"created":"2023-07-14T21:49:10.739Z","modified":"2024-12-17T22:33:13.185Z","1.0.0":"2023-07-14T21:49:10.894Z","1.0.1":"2024-02-21T07:10:55.243Z","1.0.2":"2024-12-17T20:18:33.124Z","1.0.3":"2024-12-17T22:33:13.006Z"},"bugs":{"url":"https://github.com/inspect-js/typed-array-byte-length/issues"},"author":{"name":"Jordan Harband","email":"ljharb@gmail.com"},"license":"MIT","homepage":"https://github.com/inspect-js/typed-array-byte-length#readme","keywords":["typed","array","byteLength","byte","length","robust","es","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array","BigInt64Array","BigUint64Array"],"repository":{"type":"git","url":"git+https://github.com/inspect-js/typed-array-byte-length.git"},"description":"Robustly get the byte length of a Typed Array","maintainers":[{"name":"ljharb","email":"ljharb@gmail.com"}],"readme":"# typed-array-byte-offset <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\nRobustly get the byte offset of a Typed Array, or `false` if it is not a Typed Array. Works cross-realm, in every engine, even if the `byteOffset` property is overridden.\n\n## Example\n\n```js\nvar typedArrayByteOffset = require('typed-array-byte-offset');\nvar assert = require('assert');\n\nassert.equal(false, typedArrayByteOffset(undefined));\nassert.equal(false, typedArrayByteOffset(null));\nassert.equal(false, typedArrayByteOffset(false));\nassert.equal(false, typedArrayByteOffset(true));\nassert.equal(false, typedArrayByteOffset([]));\nassert.equal(false, typedArrayByteOffset({}));\nassert.equal(false, typedArrayByteOffset(/a/g));\nassert.equal(false, typedArrayByteOffset(new RegExp('a', 'g')));\nassert.equal(false, typedArrayByteOffset(new Date()));\nassert.equal(false, typedArrayByteOffset(42));\nassert.equal(false, typedArrayByteOffset(NaN));\nassert.equal(false, typedArrayByteOffset(Infinity));\nassert.equal(false, typedArrayByteOffset(new Number(42)));\nassert.equal(false, typedArrayByteOffset('foo'));\nassert.equal(false, typedArrayByteOffset(Object('foo')));\nassert.equal(false, typedArrayByteOffset(function () {}));\nassert.equal(false, typedArrayByteOffset(function* () {}));\nassert.equal(false, typedArrayByteOffset(x => x * x));\nassert.equal(false, typedArrayByteOffset([]));\n\nconst buffer = new ArrayBuffer(32);\n\nassert.equal(8, typedArrayByteOffset(new Int8Array(buffer, 8)));\nassert.equal(8, typedArrayByteOffset(new Uint8Array(buffer, 8)));\nassert.equal(8, typedArrayByteOffset(new Uint8ClampedArray(buffer, 8)));\nassert.equal(4, typedArrayByteOffset(new Int16Array(buffer, 4)));\nassert.equal(4, typedArrayByteOffset(new Uint16Array(buffer, 4)));\nassert.equal(8, typedArrayByteOffset(new Int32Array(buffer, 8)));\nassert.equal(8, typedArrayByteOffset(new Uint32Array(buffer, 8)));\nassert.equal(16, typedArrayByteOffset(new Float32Array(buffer, 16)));\nassert.equal(16, typedArrayByteOffset(new Float64Array(buffer, 16)));\nassert.equal(16, typedArrayByteOffset(new BigInt64Array(buffer, 16)));\nassert.equal(16, typedArrayByteOffset(new BigUint64Array(buffer, 16)));\n```\n\n## Tests\nSimply clone the repo, `npm install`, and run `npm test`\n\n[package-url]: https://npmjs.org/package/typed-array-byte-offset\n[npm-version-svg]: https://versionbadg.es/inspect-js/typed-array-byte-offset.svg\n[deps-svg]: https://david-dm.org/inspect-js/typed-array-byte-offset.svg\n[deps-url]: https://david-dm.org/inspect-js/typed-array-byte-offset\n[dev-deps-svg]: https://david-dm.org/inspect-js/typed-array-byte-offset/dev-status.svg\n[dev-deps-url]: https://david-dm.org/inspect-js/typed-array-byte-offset#info=devDependencies\n[npm-badge-png]: https://nodei.co/npm/typed-array-byte-offset.png?downloads=true&stars=true\n[license-image]: https://img.shields.io/npm/l/typed-array-byte-offset.svg\n[license-url]: LICENSE\n[downloads-image]: https://img.shields.io/npm/dm/typed-array-byte-offset.svg\n[downloads-url]: https://npm-stat.com/charts.html?package=typed-array-byte-offset\n[codecov-image]: https://codecov.io/gh/inspect-js/typed-array-byte-offset/branch/main/graphs/badge.svg\n[codecov-url]: https://app.codecov.io/gh/inspect-js/typed-array-byte-offset/\n[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/typed-array-byte-offset\n[actions-url]: https://github.com/inspect-js/typed-array-byte-offset/actions\n","readmeFilename":"README.md"}