get-endianness.js 196 B

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