package nodejs
nodejs package object
- Alphabetic
- By Inheritance
- nodejs
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Package Members
- package buffer
buffer package object
- package child_process
- package cluster
cluster package object
- package console_module
- package crypto
- package dgram
- package dns
dns package object
- package events
- package fs
fs package object
- package http
http package object
- package http2
- package https
https package object
- package net
net package object
- package os
- package path
- package process
- package punycode
- package querystring
query string package object
- package readline
- package repl
repl package object
- package stream
- package timers
- package tls
- package tty
tty package object
- package url
url package object
- package util
- package v8
- package vm
- package worker_threads
- package zlib
zlib package object
Type Members
- trait Assert extends Object with IEventEmitter
The assert module provides a simple set of assertion tests that can be used to test invariants.
The assert module provides a simple set of assertion tests that can be used to test invariants. The module is intended for internal use by Node.js, but can be used in application code via require('assert'). However, assert is not a testing framework, and is not intended to be used as a general purpose assertion library.
The API for the assert module is Locked. This means that there will be no additions or changes to any of the methods implemented and exposed by the module.
- Annotations
- @RawJSType() @native()
- class Error extends Object
Creates a new Error object and sets the error.message property to the provided text message.
Creates a new Error object and sets the error.message property to the provided text message. If an object is passed as message, the text message is generated by calling message.toString(). The error.stack property will represent the point in the code at which new Error() was called. Stack traces are dependent on V8's stack trace API. Stack traces extend only to either (a) the beginning of synchronous code execution, or (b) the number of frames given by the property Error.stackTraceLimit, whichever is smaller.
- Annotations
- @RawJSType() @native() @JSImport("errors", "Error")
- type EventType = String
- type FileDescriptor = Integer
Represents a file descriptor
- type FileIOError = SystemError
- type FileMode = Int
- type FileType = Int
- type Flags = |[String, Int]
- type FsCallback0 = Function1[FileIOError, Any]
- type FsCallback1[A] = Function2[FileIOError, A, Any]
- type FsCallback2[A, B] = Function3[FileIOError, A, B, Any]
- type FsCallback3[A, B, C] = Function4[FileIOError, A, B, C, Any]
- type GID = Int
- type Handle = |[|[Function, HasHandle], HasFileDescriptor]
- trait HasFileDescriptor extends Object
- Annotations
- @ScalaJSDefined() @RawJSType()
- trait HasHandle extends Object
- Annotations
- @ScalaJSDefined() @RawJSType()
- trait Module extends Object
In each module, the module free variable is a reference to the object representing the current module.
In each module, the module free variable is a reference to the object representing the current module. For convenience, module.exports is also accessible via the exports module-global. module isn't actually a global but rather local to each module.
- Annotations
- @RawJSType() @native()
- See also
https://nodejs.org/api/modules.html#modules_the_module_object
- sealed trait Require extends Object
- Annotations
- @RawJSType() @native()
- trait RequireResolver extends Object
- Annotations
- @RawJSType() @native()
- class ResolveOptions extends Object
- Annotations
- @ScalaJSDefined() @RawJSType()
- class StringDecoder extends Object with IEventEmitter
To use this module, do require('string_decoder').
To use this module, do require('string_decoder'). StringDecoder decodes a buffer to a string. It is a simple interface to Buffer.toString() but provides additional support for utf8.
- Annotations
- @RawJSType() @native() @JSImport("string_decoder", "StringDecoder")
- class SystemError extends Error
System Error
System Error
- Annotations
- @RawJSType() @native() @JSImport("errors", "SystemError")
- type UID = Int
Deprecated Type Members
- type Console = nodejs.console_module.Console
- Annotations
- @deprecated
- Deprecated
(Since version 0.9.0) Use console_module.Console. Every module stays each own package.
- type ConsoleDirOptions = nodejs.console_module.ConsoleDirOptions
- Annotations
- @deprecated
- Deprecated
(Since version 0.9.0) Use console_module.Console. Every module stays each own package.
- type Environment = nodejs.process.Environment
- Annotations
- @deprecated
- Deprecated
(Since version 0.9.0) use process.Environment instead
- trait Global extends Object
In browsers, the top-level scope is the global scope.
In browsers, the top-level scope is the global scope. That means that in browsers if you're in the global scope var something will define a global variable. In Node.js this is different. The top-level scope is not the global scope; var something inside an Node.js module will be local to that module.
- Annotations
- @RawJSType() @native() @deprecated
- Deprecated
(Since version 0.9.0) Use io.scalajs.nodejs package object
- type Process = nodejs.process.Process
- Annotations
- @deprecated
- Deprecated
(Since version 0.9.0) use process.Process instead
Value Members
- def __dirname: String
The directory name of the current module.
The directory name of the current module. This the same as the path.dirname() of the __filename.
- def __filename: String
The file name of the current module.
The file name of the current module. This is the resolved absolute path of the current module file. For a main program this is not necessarily the same as the file name used in the command line. See __dirname for the directory name of the current module.
- object Assert extends Object with Assert
Assert Singleton
Assert Singleton
- Annotations
- @native() @JSImport("assert", JSImport.Namespace)
- object Error extends Object
Error Singleton
Error Singleton
- Annotations
- @native() @JSGlobal()
- object ErrorCodes
- object Module extends Object with Module
Module Companion
Module Companion
- Annotations
- @native() @JSImport("module", JSImport.Namespace)
- object Require extends Object with Require
- Annotations
- @native() @JSGlobal("require")
- object SystemError extends Error
System Error Singleton
System Error Singleton
- Annotations
- @native() @JSImport("errors", JSImport.Namespace)
- object SystemErrorCodes
- object clearImmediate extends Object with ClearImmediate
- Annotations
- @native() @JSGlobal("clearImmediate")
- object clearInterval extends Object with ClearInterval
- Annotations
- @native() @JSGlobal("clearInterval")
- object clearTimeout extends Object with ClearTimeout
- Annotations
- @native() @JSGlobal("clearTimeout")
- object queueMicrotask extends Function with Function1[Function, Unit]
- Annotations
- @native() @JSGlobal("queueMicrotask")
- object setImmediate extends Object with SetImmediate
- Annotations
- @native() @JSGlobal("setImmediate")
- object setInterval extends Object with SetInterval
- Annotations
- @native() @JSGlobal("setInterval")
- object setTimeout extends Object with SetTimeout
- Annotations
- @native() @JSGlobal("setTimeout")
Deprecated Value Members
- val console: Console.type
- Annotations
- @deprecated
- Deprecated
(Since version 0.9.0) Use console_module.Console. Every module stays each own package.
- implicit def duration2Double(duration: FiniteDuration): Double
Implicit conversion to translate durations into a double
Implicit conversion to translate durations into a double
- duration
the given duration
- returns
the time in milliseconds as a double
- Annotations
- @deprecated
- Deprecated
(Since version 0.9.0) Use io.scalajs.util.DurationHelper
- implicit def duration2Int(duration: FiniteDuration): Int
Implicit conversion to translate durations into an integer
Implicit conversion to translate durations into an integer
- duration
the given duration
- returns
the time in milliseconds as an integer
- Annotations
- @deprecated
- Deprecated
(Since version 0.9.0) Use io.scalajs.util.DurationHelper
- implicit def error2Exception(error: Error): Exception
Implicit conversion to transform Node Errors to Exceptions
- object global extends Object with Global
- Annotations
- @native() @JSGlobal("global") @deprecated
- Deprecated
(Since version 0.9.0) Use objects in io.scalajs.nodejs