{
  "_id": "data-view-byte-offset",
  "maintainers": [
    {
      "name": "ljharb",
      "email": "ljharb@gmail.com"
    }
  ],
  "keywords": [
    "javascript",
    "ecmascript",
    "dataView",
    "data",
    "view",
    "byte",
    "offset",
    "byteOffset",
    "robust"
  ],
  "dist-tags": {
    "latest": "1.0.1"
  },
  "author": {
    "name": "Jordan Harband",
    "email": "ljharb@gmail.com"
  },
  "_rev": "1-cf2e313bca41ed82ad5d63904073ad1d",
  "description": "Get the byteOffset out of a DataView, robustly.",
  "readme": "# data-view-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\nGet the `byteOffset` 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.byteOffset` has been deleted after this module has loaded.\n\n## Example\n\n```js\nconst dataViewByteOffset = require('data-view-byte-offset');\nconst assert = require('assert');\n\nconst ab = new ArrayBuffer(42);\nconst dv = new DataView(ab, 2);\nassert.equal(dataViewByteOffset(dv), 2);\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-offset\n[npm-version-svg]: https://versionbadg.es/inspect-js/data-view-byte-offset.svg\n[deps-svg]: https://david-dm.org/inspect-js/data-view-byte-offset.svg\n[deps-url]: https://david-dm.org/inspect-js/data-view-byte-offset\n[dev-deps-svg]: https://david-dm.org/inspect-js/data-view-byte-offset/dev-status.svg\n[dev-deps-url]: https://david-dm.org/inspect-js/data-view-byte-offset#info=devDependencies\n[npm-badge-png]: https://nodei.co/npm/data-view-byte-offset.png?downloads=true&stars=true\n[license-image]: https://img.shields.io/npm/l/data-view-byte-offset.svg\n[license-url]: LICENSE\n[downloads-image]: https://img.shields.io/npm/dm/data-view-byte-offset.svg\n[downloads-url]: https://npm-stat.com/charts.html?package=data-view-byte-offset\n[codecov-image]: https://codecov.io/gh/inspect-js/data-view-byte-offset/branch/main/graphs/badge.svg\n[codecov-url]: https://app.codecov.io/gh/inspect-js/data-view-byte-offset/\n[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/data-view-byte-offset\n[actions-url]: https://github.com/inspect-js/data-view-byte-offset/actions\n",
  "repository": {
    "type": "git",
    "url": "git+https://github.com/inspect-js/data-view-byte-offset.git"
  },
  "bugs": {
    "url": "https://github.com/inspect-js/data-view-byte-offset/issues"
  },
  "license": "MIT",
  "versions": {
    "1.0.0": {
      "name": "data-view-byte-offset",
      "version": "1.0.0",
      "keywords": [
        "javascript",
        "ecmascript",
        "dataView",
        "data",
        "view",
        "byte",
        "offset",
        "byteOffset",
        "robust"
      ],
      "author": {
        "name": "Jordan Harband",
        "email": "ljharb@gmail.com"
      },
      "license": "MIT",
      "_id": "data-view-byte-offset@1.0.0",
      "maintainers": [
        {
          "name": "ljharb",
          "email": "ljharb@gmail.com"
        }
      ],
      "homepage": "https://github.com/ljharb/data-view-byte-offset#readme",
      "bugs": {
        "url": "https://github.com/ljharb/data-view-byte-offset/issues"
      },
      "dist": {
        "shasum": "5e0bbfb4828ed2d1b9b400cd8a7d119bca0ff18a",
        "tarball": "https://archive.ito.gov.ir/npm/_packages/data-view-byte-offset/-/data-view-byte-offset-1.0.0.tgz",
        "fileCount": 11,
        "integrity": "sha512-t/Ygsytq+R995EJ5PZlD4Cu56sWa8InXySaViRzw9apusqsOO2bQP+SbYzAhR0pFKoB+43lYy8rWban9JSuXnA==",
        "signatures": [
          {
            "sig": "MEUCIEISdPydCWTZiyfjWfhb42WCT3oYj8g5PSDBxlkW+x1rAiEAoNRDEsbvHxWIKQUXO7sd8ylvTiiHTjYN//51Kbgt3Yc=",
            "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"
          }
        ],
        "unpackedSize": 12184
      },
      "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": "9f0258c1468a8a0ed3f412e2b2ac3ba25588e227",
      "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-offset.git",
        "type": "git"
      },
      "_npmVersion": "10.2.4",
      "description": "Get the byteOffset 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-offset_1.0.0_1709582406197_0.4706422519604587",
        "host": "s3://npm-registry-packages"
      }
    },
    "1.0.1": {
      "name": "data-view-byte-offset",
      "version": "1.0.1",
      "description": "Get the byteOffset 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/ljharb"
      },
      "repository": {
        "type": "git",
        "url": "git+https://github.com/inspect-js/data-view-byte-offset.git"
      },
      "keywords": [
        "javascript",
        "ecmascript",
        "dataView",
        "data",
        "view",
        "byte",
        "offset",
        "byteOffset",
        "robust"
      ],
      "author": {
        "name": "Jordan Harband",
        "email": "ljharb@gmail.com"
      },
      "license": "MIT",
      "bugs": {
        "url": "https://github.com/inspect-js/data-view-byte-offset/issues"
      },
      "homepage": "https://github.com/inspect-js/data-view-byte-offset#readme",
      "dependencies": {
        "call-bound": "^1.0.2",
        "es-errors": "^1.3.0",
        "is-data-view": "^1.0.1"
      },
      "devDependencies": {
        "@arethetypeswrong/cli": "^0.17.1",
        "@ljharb/eslint-config": "^21.1.1",
        "@ljharb/tsconfig": "^0.2.2",
        "@types/call-bind": "^1.0.5",
        "@types/es-value-fixtures": "^1.4.4",
        "@types/for-each": "^0.3.3",
        "@types/object-inspect": "^1.13.0",
        "@types/tape": "^5.6.5",
        "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"
      },
      "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-offset@1.0.1",
      "gitHead": "0160d9a9091666653b12dda2459c2ca0814a9af4",
      "_nodeVersion": "23.4.0",
      "_npmVersion": "10.9.2",
      "dist": {
        "integrity": "sha512-BS8PfmtDGnrgYdOonGZQdLZslWIeCGFP9tpan0hi1Co2Zr2NKADsvGYA8XxuG/4UWgJ6Cjtv+YJnB6MM69QGlQ==",
        "shasum": "068307f9b71ab76dbbe10291389e020856606191",
        "tarball": "https://archive.ito.gov.ir/npm/_packages/data-view-byte-offset/-/data-view-byte-offset-1.0.1.tgz",
        "fileCount": 11,
        "unpackedSize": 11130,
        "signatures": [
          {
            "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
            "sig": "MEUCIAQvMRHxZYgIOsi6uhEwcAnzCXxo87ejXtmZq9peS7fnAiEAp2Ax3BjLzjgpCNB7xVvsb8s2n/bRL+vdKg+LGKBqeJM="
          }
        ]
      },
      "_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-offset_1.0.1_1734587960435_0.4542330341176073"
      },
      "_hasShrinkwrap": false
    }
  },
  "name": "data-view-byte-offset",
  "time": {
    "created": "2024-03-04T20:00:06.196Z",
    "modified": "2026-05-13T07:00:06.562Z",
    "1.0.0": "2024-03-04T20:00:06.401Z",
    "1.0.1": "2024-12-19T05:59:20.613Z"
  },
  "readmeFilename": "README.md",
  "homepage": "https://github.com/inspect-js/data-view-byte-offset#readme"
}