Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/not-an-aardvark/endian
Tests system endianness
https://github.com/not-an-aardvark/endian
Last synced: about 1 month ago
JSON representation
Tests system endianness
- Host: GitHub
- URL: https://github.com/not-an-aardvark/endian
- Owner: not-an-aardvark
- License: mit
- Created: 2016-03-26T19:41:19.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2016-03-26T19:41:28.000Z (almost 9 years ago)
- Last Synced: 2024-11-19T16:11:44.907Z (about 2 months ago)
- Language: JavaScript
- Homepage:
- Size: 1000 Bytes
- Stars: 1
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# endian
Gets the system's endianness. Also works in browsers.
```js
var endianness = require('endian');
console.log(endianness);
// => 'LE'
```In node, this exports the string `LE` if the system is little-endian, or the string `BE` if the system is big-endian.
In browsers, this adds an `endianness` property to `window`, with a value of either `LE` or `BE`.