electron/tools/get-endianness.js
2018-09-14 14:57:01 +10:00

6 lines
195 B
JavaScript

var os = require('os')
if (os.endianness) {
console.log(require('os').endianness() === 'BE' ? 'big' : 'little')
} else { // Your Node is rather old, but I don't care.
console.log('little')
}