Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Get the byteOffset out of a DataView, robustly.

License

NotificationsYou must be signed in to change notification settings

inspect-js/data-view-byte-offset

github actionscoverageLicenseDownloads

npm badge

Get thebyteOffset 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 whereDataView.prototype.byteOffset has been deleted after this module has loaded.

Example

constdataViewByteOffset=require('data-view-byte-offset');constassert=require('assert');constab=newArrayBuffer(42);constdv=newDataView(ab,2);assert.equal(dataViewByteOffset(dv),2);

Tests

Simply clone the repo,npm install, and runnpm test

About

Get the byteOffset out of a DataView, robustly.

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks


[8]ページ先頭

©2009-2025 Movatter.jp