npm

npm’s 2019 JavaScript ecosystem survey analysis is now available!Get your copy here »

is-little-endian

0.0.0 • Public • Published

is-little-endian

Checks if your system is little endian or not. Basically a short cut for:

((new Uint32Array((new Uint8Array([1,2,3,4])).buffer))[0] === 0x04030201)

Usage

Install using npm:

npm install is-little-endian

And then just use it like this:

if(require("is-little-endian")) {
  //Use little endian buffer
} else {
  //Use big endian buffer
}

Credits

(c) 2013 Mikola Lysenko. BSD License

Keywords

none

install

npm i is-little-endian

Downloadsweekly downloads

304

version

0.0.0

license

none

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability