Browse Source

Revert "Implement os.isWindows"

This reverts commit 9e31e0837e.

Use process.platform == 'win32'
v0.7.4-release
Ryan Dahl 14 years ago
parent
commit
9bcfc0745c
  1. 4
      doc/api/os.markdown
  2. 2
      lib/os.js
  3. 6
      src/node_os.cc

4
doc/api/os.markdown

@ -14,10 +14,6 @@ Returns the operating system name.
Returns the operating system release.
### os.isWindows
True on windows, false otherwise.
### os.uptime()
Returns the system uptime in seconds.

2
lib/os.js

@ -8,5 +8,3 @@ exports.totalmem = binding.getTotalMem;
exports.cpus = binding.getCPUs;
exports.type = binding.getOSType;
exports.release = binding.getOSRelease;
exports.isWindows = binding.isWindows;

6
src/node_os.cc

@ -145,12 +145,6 @@ void OS::Initialize(v8::Handle<v8::Object> target) {
NODE_SET_METHOD(target, "getCPUs", GetCPUInfo);
NODE_SET_METHOD(target, "getOSType", GetOSType);
NODE_SET_METHOD(target, "getOSRelease", GetOSRelease);
#ifdef __POSIX__
target->Set(String::New("isWindows"), False());
#else // __MINGW32__
target->Set(String::New("isWindows"), True());
#endif
}

Loading…
Cancel
Save