Sha256: bbc29caa9818ab5e8d328d2fd3a63139a0505884a6fa1f0a701b8d5738a81e6e

Contents?: true

Size: 698 Bytes

Versions: 16

Compression:

Stored size: 698 Bytes

Contents

module NodeJS
  VERSION = `process.version`
end

`Opal.exit = process.exit`

ARGV = `process.argv.slice(2)`
ARGV.shift if ARGV.first == '--'

STDOUT.write_proc = ->(string) { `process.stdout.write(string)` }
STDERR.write_proc = ->(string) { `process.stderr.write(string)` }

`var __fs__ = require('fs')`
STDIN.read_proc = %x{function(_count) {
  // Ignore count, return as much as we can get
  var buf = Buffer.alloc(65536), count;
  try {
    count = __fs__.readSync(this.fd, buf, 0, 65536, null);
  }
  catch (e) { // Windows systems may raise EOF
    return nil;
  }
  if (count == 0) return nil;
  return buf.toString('utf8', 0, count);
}}

STDIN.tty = true
STDOUT.tty = true
STDERR.tty = true

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
opal-1.7.4 stdlib/nodejs/base.rb
opal-1.7.3 stdlib/nodejs/base.rb
opal-1.7.2 stdlib/nodejs/base.rb
opal-1.7.1 stdlib/nodejs/base.rb
opal-1.7.0 stdlib/nodejs/base.rb
opal-1.7.0.rc1 stdlib/nodejs/base.rb
opal-1.6.1 stdlib/nodejs/base.rb
opal-1.6.0 stdlib/nodejs/base.rb
opal-1.6.0.rc1 stdlib/nodejs/base.rb
opal-1.6.0.alpha1 stdlib/nodejs/base.rb
opal-1.5.1 stdlib/nodejs/base.rb
opal-1.5.0 stdlib/nodejs/base.rb
opal-1.5.0.rc1 stdlib/nodejs/base.rb
opal-1.4.1 stdlib/nodejs/base.rb
opal-1.4.0 stdlib/nodejs/base.rb
opal-1.4.0.alpha1 stdlib/nodejs/base.rb