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 module
- package net
net package object
- package os
- package path
- package perf_hooks
- 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
- package util
- package v8
- package vm
- package worker_threads
- package zlib
zlib package object
Type Members
- trait Assert extends Object
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
- @JSType() @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
- @JSType() @native() @JSGlobal()
- implicit final class ErrorExtensions extends AnyVal
- 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 FsRecursiveCallback0 = Function2[FileIOError, Path, Any]
- type GID = Int
- type Handle = |[|[Function, HasHandle], HasFileDescriptor]
- trait HasFileDescriptor extends Object
- Annotations
- @JSType()
- trait HasHandle extends Object
- Annotations
- @JSType()
- 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
- @JSType() @native()
- See also
https://nodejs.org/api/modules.html#modules_the_module_object
- sealed trait Require extends Object
- Annotations
- @JSType() @native()
- trait RequireResolver extends Object
- Annotations
- @JSType() @native()
- trait ResolveOptions extends Object
- Annotations
- @JSType()
- 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
- @JSType() @native() @JSImport("string_decoder", "StringDecoder")
- trait SystemError extends Error
System Error
System Error
- Annotations
- @JSType() @native()
- 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 Require extends Object with Require
- Annotations
- @native() @JSGlobal("require")
- object ResolveOptions
- 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 moduleObject extends Object with Module
- Annotations
- @native() @JSGlobal("module")
- 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 Module: nodejs.module.Module.type
- Annotations
- @deprecated
- Deprecated
(Since version v0.13.0) Use io.scalajs.nodejs.module.Module