Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/mikolalysenko/is-little-endian

Checks if your system is little endian
https://github.com/mikolalysenko/is-little-endian

Last synced: about 2 months ago
JSON representation

Checks if your system is little endian

Awesome Lists containing this project

README

        

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

```JavaScript
((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:

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

Credits
=======
(c) 2013 Mikola Lysenko. BSD License