electron/tools/get-endianness.js

7 lines
196 B
JavaScript
Raw Normal View History

2016-04-07 06:56:25 +00:00
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')
}