Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/mikolalysenko/is-little-endian
- Owner: mikolalysenko
- Created: 2013-02-24T00:50:53.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2015-05-06T20:05:16.000Z (over 9 years ago)
- Last Synced: 2024-10-20T14:28:05.429Z (2 months ago)
- Language: JavaScript
- Size: 358 KB
- Stars: 5
- Watchers: 5
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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