1.0.1 • Published 10 months ago

data-view-byte-offset v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

data-view-byte-offset Version Badge

github actions coverage License Downloads

npm badge

Get the byteOffset out of a DataView, robustly.

This will work in node <= 0.10 and < 0.11.4, where there's no prototype accessor, only a nonconfigurable own property. It will also work in modern engines where DataView.prototype.byteOffset has been deleted after this module has loaded.

Example

const dataViewByteOffset = require('data-view-byte-offset');
const assert = require('assert');

const ab = new ArrayBuffer(42);
const dv = new DataView(ab, 2);
assert.equal(dataViewByteOffset(dv), 2);

Tests

Simply clone the repo, npm install, and run npm test

es-abstracttemplatetea0xxazrael404x-diospadatehe-titidteapackage-tatespoorman297superboysui-monorepotempebaladosportscale-wifi-connecttestdrivexxonevantiq-react@pradeepgudipati/kovaad-chat-ui-kit-styles@rozzkml/okemdev@youngseokangg/common-bundleistoun-pluginip-designkardussomplakkamanawaejesh-calculationjnf-accesscontrol-rnttljokitalejosh-fcakatilatekasurbulukk0ng_d1nosaur_quenak0ng_d1nosaur_quenbk0ng_d1nosaur_quenck0ng_d1nosaur_quendk0ng_d1nosaur_quenek0ng_d1nosaur_quenfk0ng_d1nosaur_quengk0ng_d1nosaur_quenhk0ng_d1nosaur_quenik0ng_d1nosaur_quenjk0ng_d1nosaur_quenkk0ng_d1nosaur_quennk0ng_d1nosaur_quenok0ng_d1nosaur_quenpk0ng_d1nosaur_quenqk0ng_d1nosaur_quenrk0ng_d1nosaur_quenlk0ng_d1nosaur_quenmk0ng_d1nosaur_quensk0ng_d1nosaur_quentk0ng_d1nosaur_quenuk0ng_d1nosaur_quenvk0ng_d1nosaur_quenwk0ng_d1nosaur_quenxk0ng_d1nosaur_quenyk0ng_d1nosaur_quenzkumahadamangilhamagungimamhytoltehoteahayuatuhhayuulinlembah1makjplagimaksilloppmaksimumprmmanan-react-native-expo-authorize-netmedia-capturalnw-bot-fblab-js-avanzado-taugotkolapusangkolotarekrown_login_librarymekokklipoomdocument-scanner@web-beest/rivm-design-tokens@xazrael/xazrael404@xazrael/xazxazrael404@tlgeo/react-native-gdal@thuromun/thurotea@zotasys/native@zoldixs/zoldixs-teaairdropfamilyabdicagerayenaurangaroma-tehapps-bogeg5758-tea-ibc22501a0548@greytch/safe-area@ahmed_shaban123/react-native-currencyinput@adatechnology/react-native-android-getnet-pos@edwinpb/scany@codingdud/coolicons@ajaykewat/myboilerplate@cristianps1988/ds-template@atlantjs.dev/guardiantest_lib_module_aartea-fairly@gericuz/tea-fairlyanci-reactquickcapture_react_native@kangarooswapfinance/v2-corespacex_cycl3_roamo
1.0.1

10 months ago

1.0.0

2 years ago