Fix problem with old Node
This commit is contained in:
parent
71b67534a8
commit
cb47dfa90e
1 changed files with 6 additions and 1 deletions
|
@ -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')
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue