diff --git a/tools/get-endianness.js b/tools/get-endianness.js index a1f985e18a0..a910e664b05 100644 --- a/tools/get-endianness.js +++ b/tools/get-endianness.js @@ -1 +1,6 @@ -console.log(require('os').endianness() === 'BE' ? 'big' : 'little') +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') +}