{"_id":"typed-array-byte-offset","_rev":"2-f41bc6ede208d90758d88b343b775622","name":"typed-array-byte-offset","dist-tags":{"latest":"1.0.2"},"versions":{"1.0.0":{"name":"typed-array-byte-offset","version":"1.0.0","description":"Robustly get the byte offset of a Typed Array","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)\")\""},"repository":{"type":"git","url":"git+https://github.com/inspect-js/typed-array-byte-offset.git"},"keywords":["typed","array","byteOffset","byte","offset","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-offset/issues"},"homepage":"https://github.com/inspect-js/typed-array-byte-offset#readme","dependencies":{"available-typed-arrays":"^1.0.5","call-bind":"^1.0.2","for-each":"^0.3.3","has-proto":"^1.0.1","is-typed-array":"^1.1.10"},"devDependencies":{"@ljharb/eslint-config":"^21.1.0","aud":"^2.0.2","auto-changelog":"^2.4.0","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.0","nyc":"^10.3.2","object-inspect":"^1.12.3","safe-publish-latest":"^2.0.0","tape":"^5.6.3"},"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"]},"gitHead":"7fd466a36296649069d8b3817a8ee9c1f6a1624e","_id":"typed-array-byte-offset@1.0.0","_nodeVersion":"20.2.0","_npmVersion":"9.6.6","dist":{"integrity":"sha512-RD97prjEt9EL8YgAgpOkf3O4IF9lhJFr9g0htQkm0rchFp/Vx7LW5Q8fSXXub7BXAODyUQohRMyOc3faCPd0hg==","shasum":"cbbe89b51fdef9cd6aaf07ad4707340abbc4ea0b","tarball":"https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.0.tgz","fileCount":9,"unpackedSize":13716,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAsaBHCjOMSiamrqigxiU3UYBh7aTFSX8I3e68htcyk5AiAm4JItsWQToZ00lr/U4iqiYsPOdJH4gAiE7+4ISExMiw=="}]},"_npmUser":{"name":"ljharb","email":"ljharb@gmail.com"},"directories":{},"maintainers":[{"name":"ljharb","email":"ljharb@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/typed-array-byte-offset_1.0.0_1686066812502_0.5306134094032289"},"_hasShrinkwrap":false},"1.0.1":{"name":"typed-array-byte-offset","version":"1.0.1","description":"Robustly get the byte offset of a Typed Array","main":"index.js","exports":{".":"./index.js","./package.json":"./package.json"},"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 .","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)\")\""},"repository":{"type":"git","url":"git+https://github.com/inspect-js/typed-array-byte-offset.git"},"keywords":["typed","array","byteOffset","byte","offset","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-offset/issues"},"homepage":"https://github.com/inspect-js/typed-array-byte-offset#readme","dependencies":{"available-typed-arrays":"^1.0.6","call-bind":"^1.0.7","for-each":"^0.3.3","gopd":"^1.0.1","has-proto":"^1.0.1","is-typed-array":"^1.1.13"},"devDependencies":{"@ljharb/eslint-config":"^21.1.0","aud":"^2.0.4","auto-changelog":"^2.4.0","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.1","safe-publish-latest":"^2.0.0","tape":"^5.7.5"},"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-offset@1.0.1","gitHead":"b4d211aafe9afb8e5400be66dd2961268a3e0d4b","_nodeVersion":"21.6.2","_npmVersion":"10.2.4","dist":{"integrity":"sha512-tcqKMrTRXjqvHN9S3553NPCaGL0VPgFI92lXszmrE8DMhiDPLBYLlvo8Uu4WZAAX/aGqp/T1sbA4ph8EWjDF9Q==","shasum":"5e2bcc1d93e1a332d50e8b363a48604a134692f8","tarball":"https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.1.tgz","fileCount":9,"unpackedSize":14657,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDZCVPuoKjrhMYfDS1GNgsirp6n4otzwLYhtvvPkl/7TAIhAM0L/aPIjcjfOOKiGB2iBqXnAIOYVfOIc/IgzGdBhn6P"}]},"_npmUser":{"name":"ljharb","email":"ljharb@gmail.com"},"directories":{},"maintainers":[{"name":"ljharb","email":"ljharb@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/typed-array-byte-offset_1.0.1_1708219386628_0.6192121009904936"},"_hasShrinkwrap":false},"1.0.2":{"name":"typed-array-byte-offset","version":"1.0.2","description":"Robustly get the byte offset 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 .","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)\")\""},"repository":{"type":"git","url":"git+https://github.com/inspect-js/typed-array-byte-offset.git"},"keywords":["typed","array","byteOffset","byte","offset","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-offset/issues"},"homepage":"https://github.com/inspect-js/typed-array-byte-offset#readme","dependencies":{"available-typed-arrays":"^1.0.7","call-bind":"^1.0.7","for-each":"^0.3.3","gopd":"^1.0.1","has-proto":"^1.0.3","is-typed-array":"^1.1.13"},"devDependencies":{"@ljharb/eslint-config":"^21.1.0","@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.8.4","@types/tape":"^5.6.4","aud":"^2.0.4","auto-changelog":"^2.4.0","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.1","possible-typed-array-names":"^1.0.0","safe-publish-latest":"^2.0.0","tape":"^5.7.5","typescript":"^5.4.0-dev.20240219"},"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-offset@1.0.2","gitHead":"f3ae6d13a3927d3f3c32d61e2b6519aaa2babbd4","_nodeVersion":"21.6.2","_npmVersion":"10.2.4","dist":{"integrity":"sha512-Ous0vodHa56FviZucS2E63zkgtgrACj7omjwd/8lTEMEPFFyjfixMZ1ZXenpgCFBBt4EC1J2XsyVS2gkG0eTFA==","shasum":"f9ec1acb9259f395093e4567eb3c28a580d02063","tarball":"https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.2.tgz","fileCount":11,"unpackedSize":20302,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC1ghCgHRsxInOcVTYBwxJTKk02BoK0H2eEd5cEp60BKwIhAOMEdVjv85447q/LEvNKDirmz5SDg4ag2/XVitlrTros"}]},"_npmUser":{"name":"ljharb","email":"ljharb@gmail.com"},"directories":{},"maintainers":[{"name":"ljharb","email":"ljharb@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/typed-array-byte-offset_1.0.2_1708450491484_0.016329440450937094"},"_hasShrinkwrap":false}},"time":{"created":"2023-06-06T15:53:32.502Z","1.0.0":"2023-06-06T15:53:32.712Z","modified":"2024-02-20T17:34:52.490Z","1.0.1":"2024-02-18T01:23:06.792Z","1.0.2":"2024-02-20T17:34:51.662Z"},"maintainers":[{"name":"ljharb","email":"ljharb@gmail.com"}],"description":"Robustly get the byte offset of a Typed Array","homepage":"https://github.com/inspect-js/typed-array-byte-offset#readme","keywords":["typed","array","byteOffset","byte","offset","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-offset.git"},"author":{"name":"Jordan Harband","email":"ljharb@gmail.com"},"bugs":{"url":"https://github.com/inspect-js/typed-array-byte-offset/issues"},"license":"MIT","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"}