electron/tools/get-endianness.js

7 lines
195 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')
2018-09-13 16:10:51 +00:00
} else { // Your Node is rather old, but I don't care.
2016-04-07 06:56:25 +00:00
console.log('little')
}