We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d02f228 commit ef0926cCopy full SHA for ef0926c
src/node_os.cc
@@ -50,10 +50,7 @@ using namespace v8;
50
51
static Handle<Value> GetEndianness(const Arguments& args) {
52
HandleScope scope(node_isolate);
53
- int i = 1;
54
- bool big = (*(char *)&i) == 0;
55
- Local<String> endianness = String::New(big ? "BE" : "LE");
56
- return scope.Close(endianness);
+ return scope.Close(String::New(IsBigEndian() ? "BE" : "LE"));
57
}
58
59
static Handle<Value> GetHostname(const Arguments& args) {
0 commit comments