electron/tools/get-endianness.js
2016-04-07 15:59:28 +09:00

6 lines
196 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')
}