package nodejs
nodejs package object
- Alphabetic
- By Inheritance
- nodejs
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
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
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
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" )