{"_id":"is-data-view","_rev":"3759243","name":"is-data-view","description":"Is this value a JS DataView? This module works cross-realm/iframe, does not depend on `instanceof` or mutable properties, and despite ES6 Symbol.toStringTag.","dist-tags":{"latest":"1.0.2"},"maintainers":[{"name":"ljharb","email":""}],"time":{"modified":"2025-03-31T02:31:21.000Z","created":"2024-01-31T22:20:29.100Z","1.0.2":"2024-12-12T05:43:54.162Z","1.0.1":"2024-02-02T16:51:47.299Z","1.0.0":"2024-01-31T22:20:29.100Z"},"users":{},"author":{"name":"Jordan Harband","email":"ljharb@gmail.com"},"repository":{"type":"git","url":"git+https://github.com/inspect-js/is-data-view.git"},"versions":{"1.0.2":{"name":"is-data-view","version":"1.0.2","description":"Is this value a JS DataView? This module works cross-realm/iframe, does not depend on `instanceof` or mutable properties, and despite ES6 Symbol.toStringTag.","main":"index.js","exports":{".":"./index.js","./package.json":"./package.json"},"types":"./index.d.ts","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 .","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/is-data-view.git"},"keywords":["javascript","ecmascript","dataview","data","view","typedarray","typedarrays"],"author":{"name":"Jordan Harband","email":"ljharb@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/inspect-js/is-data-view/issues"},"homepage":"https://github.com/inspect-js/is-data-view#readme","dependencies":{"call-bound":"^1.0.2","get-intrinsic":"^1.2.6","is-typed-array":"^1.1.13"},"devDependencies":{"@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/make-arrow-function":"^1.2.2","@types/make-generator-function":"^2.0.3","@types/node":"^20.17.10","@types/object-inspect":"^1.13.0","@types/tape":"^5.6.5","auto-changelog":"^2.5.0","available-typed-arrays":"^1.0.7","encoding":"^0.1.13","es-value-fixtures":"^1.5.0","eslint":"=8.8.0","evalmd":"^0.0.19","for-each":"^0.3.3","has-tostringtag":"^1.0.2","in-publish":"^2.0.1","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"},"testling":{"files":"test/index.js"},"engines":{"node":">= 0.4"},"auto-changelog":{"output":"CHANGELOG.md","template":"keepachangelog","unreleased":false,"commitLimit":false,"backfillLimit":false,"hideCredit":true},"publishConfig":{"ignore":[".github/workflows"]},"_id":"is-data-view@1.0.2","gitHead":"e8a4943b72a33a075c6f9fd31f4e9e8a53e15b02","_nodeVersion":"23.4.0","_npmVersion":"10.9.2","dist":{"shasum":"bae0a41b9688986c2188dda6657e56b8f9e63b8e","size":5343,"noattachment":false,"key":"/is-data-view/-/is-data-view-1.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/is-data-view/download/is-data-view-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/is-data-view_1.0.2_1733982233986_0.9136895077877312"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2024-12-12T05:43:54.162Z","publish_time":1733982234162,"_source_registry_name":"default","_cnpm_publish_time":1733982234162},"1.0.1":{"name":"is-data-view","version":"1.0.1","description":"Is this value a JS DataView? This module works cross-realm/iframe, does not depend on `instanceof` or mutable properties, and despite ES6 Symbol.toStringTag.","main":"index.js","exports":{".":"./index.js","./package.json":"./package.json"},"types":"./index.d.ts","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 .","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/inspect-js/is-data-view.git"},"keywords":["javascript","ecmascript","dataview","data","view","typedarray","typedarrays"],"author":{"name":"Jordan Harband","email":"ljharb@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/inspect-js/is-data-view/issues"},"homepage":"https://github.com/inspect-js/is-data-view#readme","dependencies":{"is-typed-array":"^1.1.13"},"devDependencies":{"@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/make-arrow-function":"^1.2.2","@types/make-generator-function":"^2.0.3","@types/node":"^20.11.14","@types/object-inspect":"^1.8.4","@types/tape":"^5.6.4","aud":"^2.0.4","auto-changelog":"^2.4.0","available-typed-arrays":"^1.0.6","es-value-fixtures":"^1.4.2","eslint":"=8.8.0","evalmd":"^0.0.19","for-each":"^0.3.3","has-tostringtag":"^1.0.2","in-publish":"^2.0.1","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.4","typescript":"next"},"testling":{"files":"test/index.js"},"engines":{"node":">= 0.4"},"auto-changelog":{"output":"CHANGELOG.md","template":"keepachangelog","unreleased":false,"commitLimit":false,"backfillLimit":false,"hideCredit":true},"publishConfig":{"ignore":[".github/workflows"]},"_id":"is-data-view@1.0.1","gitHead":"2a35354be23b672154070c766bdf857eb4e8990b","_nodeVersion":"21.6.0","_npmVersion":"10.2.4","dist":{"shasum":"4b4d3a511b70f3dc26d42c03ca9ca515d847759f","size":6051,"noattachment":false,"key":"/is-data-view/-/is-data-view-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/is-data-view/download/is-data-view-1.0.1.tgz"},"_npmUser":{"name":"ljharb","email":"ljharb@gmail.com"},"directories":{},"maintainers":[{"name":"ljharb","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/is-data-view_1.0.1_1706892707040_0.17690690783555563"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2024-02-02T16:51:47.299Z","publish_time":1706892707299,"_source_registry_name":"default","_cnpm_publish_time":1706892707299},"1.0.0":{"name":"is-data-view","version":"1.0.0","description":"Is this value a JS DataView? This module works cross-realm/iframe, does not depend on `instanceof` or mutable properties, and despite ES6 Symbol.toStringTag.","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","prelint":"evalmd README.md","lint":"eslint --ext=js,mjs .","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/inspect-js/is-data-view.git"},"keywords":["javascript","ecmascript","dataview","data","view","typedarray","typedarrays"],"author":{"name":"Jordan Harband","email":"ljharb@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/inspect-js/is-data-view/issues"},"homepage":"https://github.com/inspect-js/is-data-view#readme","dependencies":{"is-typed-array":"^1.1.12"},"devDependencies":{"@ljharb/eslint-config":"^21.1.0","aud":"^2.0.3","auto-changelog":"^2.4.0","available-typed-arrays":"^1.0.5","es-value-fixtures":"^1.4.2","eslint":"=8.8.0","evalmd":"^0.0.19","for-each":"^0.3.3","has-tostringtag":"^1.0.0","in-publish":"^2.0.1","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.5"},"testling":{"files":"test/index.js"},"engines":{"node":">= 0.4"},"auto-changelog":{"output":"CHANGELOG.md","template":"keepachangelog","unreleased":false,"commitLimit":false,"backfillLimit":false,"hideCredit":true},"publishConfig":{"ignore":[".github/workflows"]},"_id":"is-data-view@1.0.0","gitHead":"684361510ea1ac6ccbdd7b1fe5940d828af8fb76","_nodeVersion":"21.6.0","_npmVersion":"10.2.4","dist":{"shasum":"fb78e6c1c0df965b6a9891896c9acbb62b9ef62f","size":4444,"noattachment":false,"key":"/is-data-view/-/is-data-view-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/is-data-view/download/is-data-view-1.0.0.tgz"},"_npmUser":{"name":"ljharb","email":"ljharb@gmail.com"},"directories":{},"maintainers":[{"name":"ljharb","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/is-data-view_1.0.0_1706739628929_0.06076287608283515"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2024-01-31T22:20:29.100Z","publish_time":1706739629100,"_source_registry_name":"default","_cnpm_publish_time":1706739629100}},"readme":"# is-data-view <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\nIs this value a JS DataView? This module works cross-realm/iframe, does not depend on `instanceof` or mutable properties, and despite ES6 Symbol.toStringTag.\n\n## Example\n\n```js\nvar isDataView = require('is-data-view');\nvar assert = require('assert');\n\nassert.equal(false, isDataView(undefined));\nassert.equal(false, isDataView(null));\nassert.equal(false, isDataView(false));\nassert.equal(false, isDataView(true));\nassert.equal(false, isDataView([]));\nassert.equal(false, isDataView({}));\nassert.equal(false, isDataView(/a/g));\nassert.equal(false, isDataView(new RegExp('a', 'g')));\nassert.equal(false, isDataView(new Date()));\nassert.equal(false, isDataView(42));\nassert.equal(false, isDataView(NaN));\nassert.equal(false, isDataView(Infinity));\nassert.equal(false, isDataView(new Number(42)));\nassert.equal(false, isDataView('foo'));\nassert.equal(false, isDataView(Object('foo')));\nassert.equal(false, isDataView(function () {}));\nassert.equal(false, isDataView(function* () {}));\nassert.equal(false, isDataView(x => x * x));\nassert.equal(false, isDataView([]));\nassert.equal(false, isDataView(new Int8Array()));\nassert.equal(false, isDataView(new Uint8Array()));\nassert.equal(false, isDataView(new Uint8ClampedArray()));\nassert.equal(false, isDataView(new Int16Array()));\nassert.equal(false, isDataView(new Uint16Array()));\nassert.equal(false, isDataView(new Int32Array()));\nassert.equal(false, isDataView(new Uint32Array()));\nassert.equal(false, isDataView(new Float32Array()));\nassert.equal(false, isDataView(new Float64Array()));\nassert.equal(false, isDataView(new BigInt64Array()));\nassert.equal(false, isDataView(new BigUint64Array()));\n\nassert.ok(isDataView(new DataView(new ArrayBuffer(0))));\n```\n\n## Tests\nSimply clone the repo, `npm install`, and run `npm test`\n\n[package-url]: https://npmjs.org/package/is-data-view\n[npm-version-svg]: https://versionbadg.es/inspect-js/is-data-view.svg\n[deps-svg]: https://david-dm.org/inspect-js/is-data-view.svg\n[deps-url]: https://david-dm.org/inspect-js/is-data-view\n[dev-deps-svg]: https://david-dm.org/inspect-js/is-data-view/dev-status.svg\n[dev-deps-url]: https://david-dm.org/inspect-js/is-data-view#info=devDependencies\n[npm-badge-png]: https://nodei.co/npm/is-data-view.png?downloads=true&stars=true\n[license-image]: https://img.shields.io/npm/l/is-data-view.svg\n[license-url]: LICENSE\n[downloads-image]: https://img.shields.io/npm/dm/is-data-view.svg\n[downloads-url]: https://npm-stat.com/charts.html?package=is-data-view\n[codecov-image]: https://codecov.io/gh/inspect-js/is-data-view/branch/main/graphs/badge.svg\n[codecov-url]: https://app.codecov.io/gh/inspect-js/is-data-view/\n[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/is-data-view\n[actions-url]: https://github.com/inspect-js/is-data-view/actions\n","_attachments":{},"homepage":"https://github.com/inspect-js/is-data-view#readme","bugs":{"url":"https://github.com/inspect-js/is-data-view/issues"},"license":"MIT"}