CoolFace
Datasetpublic

basant307/AI_Governance_Project

sourceHugging Faceapache-2.0updated 2mo agoView on Hugging Face
0likes48downloads
1# data-view-byte-offset <sup>[![Version Badge][npm-version-svg]][package-url]</sup>2 3[![github actions][actions-image]][actions-url]4[![coverage][codecov-image]][codecov-url]5[![License][license-image]][license-url]6[![Downloads][downloads-image]][downloads-url]7 8[![npm badge][npm-badge-png]][package-url]9 10Get the `byteOffset` out of a DataView, robustly.11 12This will work in node <= 0.10 and < 0.11.4, where there's no prototype accessor, only a nonconfigurable own property.13It will also work in modern engines where `DataView.prototype.byteOffset` has been deleted after this module has loaded.14 15## Example16 17```js18const dataViewByteOffset = require('data-view-byte-offset');19const assert = require('assert');20 21const ab = new ArrayBuffer(42);22const dv = new DataView(ab, 2);23assert.equal(dataViewByteOffset(dv), 2);24```25 26## Tests27Simply clone the repo, `npm install`, and run `npm test`28 29[package-url]: https://npmjs.org/package/data-view-byte-offset30[npm-version-svg]: https://versionbadg.es/inspect-js/data-view-byte-offset.svg31[deps-svg]: https://david-dm.org/inspect-js/data-view-byte-offset.svg32[deps-url]: https://david-dm.org/inspect-js/data-view-byte-offset33[dev-deps-svg]: https://david-dm.org/inspect-js/data-view-byte-offset/dev-status.svg34[dev-deps-url]: https://david-dm.org/inspect-js/data-view-byte-offset#info=devDependencies35[npm-badge-png]: https://nodei.co/npm/data-view-byte-offset.png?downloads=true&stars=true36[license-image]: https://img.shields.io/npm/l/data-view-byte-offset.svg37[license-url]: LICENSE38[downloads-image]: https://img.shields.io/npm/dm/data-view-byte-offset.svg39[downloads-url]: https://npm-stat.com/charts.html?package=data-view-byte-offset40[codecov-image]: https://codecov.io/gh/inspect-js/data-view-byte-offset/branch/main/graphs/badge.svg41[codecov-url]: https://app.codecov.io/gh/inspect-js/data-view-byte-offset/42[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/data-view-byte-offset43[actions-url]: https://github.com/inspect-js/data-view-byte-offset/actions44 
basant307/AI_Governance_Project · CoolFace