Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/dop251/goja_nodejs
/ functions
Functions
467 in github.com/dop251/goja_nodejs
⨍
Functions
467
◇
Types & classes
41
↓ 70 callers
Method
String
()
url/nodeurl.go:84
↓ 49 callers
Function
Bytes
(r *goja.Runtime, v goja.Value)
buffer/buffer.go:49
↓ 46 callers
Function
runTestCases
(t *testing.T, tcs []testCase)
buffer/buffer_test.go:345
↓ 37 callers
Method
getOffsetArgument
(call goja.FunctionCall, argIndex int, bb []byte, numBytes int64)
buffer/buffer.go:1023
↓ 36 callers
Method
toString
* Decodes `buf` to a string according to the specified character encoding in`encoding`. `start` and `end` may be passed to decode only a subset of `bu
buffer/types/buffer.d.ts:210
↓ 30 callers
Method
Enable
Enable adds the require() function to the specified runtime.
require/module.go:108
↓ 24 callers
Function
NewEventLoop
(opts ...Option)
eventloop/eventloop.go:57
↓ 24 callers
Method
Run
Run calls the specified function, starts the event loop and waits until there are no more delayed jobs to run after which it stops the loop and return
eventloop/eventloop.go:232
↓ 22 callers
Function
testSetPort
(port, expected)
url/testdata/url_test.js:131
↓ 18 callers
Function
NewTypeError
(r *goja.Runtime, code string, params ...interface{})
errors/errors.go:48
↓ 16 callers
Function
RequiredIntegerArgument
(r *goja.Runtime, call goja.FunctionCall, name string, argIndex int)
goutil/argtypes.go:12
↓ 13 callers
Function
toUrlSearchParams
(r *goja.Runtime, v goja.Value)
url/urlsearchparams.go:29
↓ 12 callers
Function
NewArgumentOutOfRangeError
(r *goja.Runtime, name string, v any)
errors/errors.go:95
↓ 12 callers
Method
defineURLAccessorProp
(p *goja.Object, name string, getter func(*nodeURL) interface{}, setter func(*nodeURL, goja.Value))
url/url.go:45
↓ 10 callers
Method
Stop
Stop the loop that was started with Start(). After this function returns there will be no more jobs executed by the loop. It is possible to call Start
eventloop/eventloop.go:262
↓ 9 callers
Function
NewRegistry
(opts ...Option)
require/module.go:60
↓ 9 callers
Method
SetTimeout
SetTimeout schedules to run the specified function in the context of the loop as soon as possible after the specified timeout period. SetTimeout retur
eventloop/eventloop.go:163
↓ 9 callers
Method
Start
Start the event loop in the background. The loop continues to run until Stop() is called. If the loop is already started it will panic.
eventloop/eventloop.go:240
↓ 8 callers
Function
RegisterCoreModule
RegisterCoreModule registers a nodejs core module. If the name does not start with "node:", the module will also be loadable as "node:<name>". Hence,
require/module.go:270
↓ 8 callers
Method
RunOnLoop
RunOnLoop schedules to run the specified function in the context of the loop as soon as possible. The order of the runs is preserved (i.e. the functio
eventloop/eventloop.go:319
↓ 8 callers
Function
testURLCtor
(str, expected)
url/testdata/url_test.js:5
↓ 7 callers
Function
Require
(runtime *js.Runtime, name string)
require/module.go:239
↓ 7 callers
Function
WithLoader
WithLoader sets a function which will be called by the require() function in order to get a source code for a module at the given path. The same funct
require/module.go:80
↓ 7 callers
Method
fromBytes
(data []byte)
buffer/buffer.go:256
↓ 7 callers
Function
testURLCtorBase
(ref, base, expected, message)
url/testdata/url_test.js:9
↓ 6 callers
Method
addAuxJob
(fn func())
eventloop/eventloop.go:369
↓ 6 callers
Function
newMissingArgsError
(r *goja.Runtime, msg string)
url/urlsearchparams.go:21
↓ 6 callers
Method
resolvePath
(base, name string)
require/resolve.go:15
↓ 6 callers
Function
testSetProtocol
(url, protocol, expected)
url/testdata/url_test.js:187
↓ 5 callers
Method
Encode
([]byte)
buffer/buffer.go:151
↓ 5 callers
Method
Format
(b *bytes.Buffer, f string, args ...goja.Value)
util/module.go:42
↓ 5 callers
Function
NewArgumentNotNumberTypeError
(r *goja.Runtime, name string)
errors/errors.go:87
↓ 5 callers
Function
NewNotCorrectTypeError
(r *goja.Runtime, name, _type string)
errors/errors.go:91
↓ 5 callers
Method
Require
Require can be used to import modules from Go source (similar to JS require() function).
require/module.go:230
↓ 5 callers
Method
SetInterval
SetInterval schedules to repeatedly run the specified function in the context of the loop as soon as possible after every specified timeout period. S
eventloop/eventloop.go:192
↓ 5 callers
Method
loadModule
(path string)
require/resolve.go:211
↓ 5 callers
Method
log
(p func(string))
console/module.go:23
↓ 5 callers
Method
newInvalidURLError
(msg, input string)
url/url.go:39
↓ 5 callers
Function
testCtor
(value, expected)
url/testdata/url_search_params.js:7
↓ 4 callers
Method
ClearInterval
ClearInterval cancels an Interval returned by SetInterval. ClearInterval is safe to call inside or outside the loop.
eventloop/eventloop.go:207
↓ 4 callers
Function
Enable
(runtime *goja.Runtime)
console/module.go:66
↓ 4 callers
Function
Enable
(runtime *goja.Runtime)
url/module.go:28
↓ 4 callers
Function
New
(runtime *goja.Runtime)
util/module.go:96
↓ 4 callers
Method
RegisterNativeModule
(name string, loader ModuleLoader)
require/module.go:120
↓ 4 callers
Function
RequiredBigIntArgument
(r *goja.Runtime, call goja.FunctionCall, name string, argIndex int)
goutil/argtypes.go:76
↓ 4 callers
Function
RequiredFloatArgument
(r *goja.Runtime, call goja.FunctionCall, name string, argIndex int)
goutil/argtypes.go:40
↓ 4 callers
Method
getVariableLengthReadArguments
(call goja.FunctionCall, bb []byte)
buffer/buffer.go:1033
↓ 4 callers
Method
getVariableLengthWriteArguments
(call goja.FunctionCall, bb []byte)
buffer/buffer.go:1037
↓ 4 callers
Function
ishex
(c byte)
url/escape.go:31
↓ 4 callers
Method
markUpdated
()
url/urlsearchparams.go:312
↓ 4 callers
Method
parseURL
(s string, isBase bool)
url/url.go:167
↓ 4 callers
Method
removeJob
(job *job)
eventloop/eventloop.go:468
↓ 4 callers
Method
start
(loop *EventLoop, timeout time.Duration)
eventloop/eventloop.go:390
↓ 4 callers
Function
toURL
(r *goja.Runtime, v goja.Value)
url/url.go:29
↓ 3 callers
Method
ClearTimeout
ClearTimeout cancels a Timer returned by SetTimeout if it has not run yet. ClearTimeout is safe to call inside or outside the loop.
eventloop/eventloop.go:178
↓ 3 callers
Method
DecodeAppend
(string, []byte)
buffer/buffer.go:150
↓ 3 callers
Function
Enable
(runtime *goja.Runtime)
process/module.go:31
↓ 3 callers
Method
Error
(string)
console/module.go:20
↓ 3 callers
Function
NewRangeError
(r *goja.Runtime, code string, params ...interface{})
errors/errors.go:54
↓ 3 callers
Method
Terminate
Terminate stops the loop and clears all active timeouts and intervals. After it returns there are no active timers or goroutines associated with the l
eventloop/eventloop.go:289
↓ 3 callers
Function
WithGlobalFolders
WithGlobalFolders appends the given paths to the registry's list of global folders to search if the requested module is not found elsewhere. By defau
require/module.go:101
↓ 3 callers
Method
domainToASCII
(domUnicode string)
url/url.go:403
↓ 3 callers
Method
domainToUnicode
(domASCII string)
url/url.go:411
↓ 3 callers
Function
expandSlice
(b []byte, l int)
buffer/buffer.go:226
↓ 3 callers
Function
filepathClean
(p string)
require/module.go:225
↓ 3 callers
Method
fixURL
(u *url.URL)
url/url.go:207
↓ 3 callers
Method
getStringCodec
(enc goja.Value)
buffer/buffer.go:337
↓ 3 callers
Function
isSpecialProtocol
(protocol string)
url/url.go:127
↓ 3 callers
Method
loadIndex
(modpath string)
require/resolve.go:131
↓ 3 callers
Function
mapFileSystemSourceLoader
(files map[string]string)
require/module_test.go:18
↓ 3 callers
Method
newURLSearchParamsIterator
(sp *urlSearchParams, typ urlSearchParamsIteratorType)
url/urlsearchparams.go:399
↓ 3 callers
Function
parseSearchQuery
(query string)
url/nodeurl.go:127
↓ 3 callers
Method
run
(inBackground bool)
eventloop/eventloop.go:335
↓ 3 callers
Method
runAux
()
eventloop/eventloop.go:323
↓ 3 callers
Method
setRunning
()
eventloop/eventloop.go:213
↓ 3 callers
Method
syncSearchParams
This methods ensures that the url.URL has the proper RawQuery based on the searchParam structs. If a change is made to the searchParams we need to kee
url/nodeurl.go:74
↓ 3 callers
Function
unescapeSearchParam
(s string)
url/escape.go:92
↓ 3 callers
Method
wakeup
()
eventloop/eventloop.go:362
↓ 2 callers
Function
CoercedIntegerArgument
(call goja.FunctionCall, argIndex int, defaultValue int64, typeMismatchValue int64)
goutil/argtypes.go:52
↓ 2 callers
Method
Decode
(s string)
buffer/buffer.go:152
↓ 2 callers
Function
EnableConsole
EnableConsole controls whether the "console" module is loaded into the runtime used by the loop. By default, loops are created with the "console" mod
eventloop/eventloop.go:94
↓ 2 callers
Method
Log
(string)
console/module.go:18
↓ 2 callers
Function
OptionalIntegerArgument
(r *goja.Runtime, call goja.FunctionCall, name string, argIndex int, defaultValue int64)
goutil/argtypes.go:64
↓ 2 callers
Method
WrapBytes
(data []byte)
buffer/buffer.go:135
↓ 2 callers
Method
_from
(args ...goja.Value)
buffer/buffer.go:264
↓ 2 callers
Function
addProps
(r *goja.Runtime, e *goja.Object, code string)
errors/errors.go:43
↓ 2 callers
Function
api
(mod *goja.Object)
buffer/buffer.go:70
↓ 2 callers
Function
cleanPath
(p, proto string)
url/url.go:197
↓ 2 callers
Function
clearURLPort
(u *url.URL)
url/url.go:143
↓ 2 callers
Method
createModuleObject
()
require/resolve.go:205
↓ 2 callers
Function
createVM
()
url/urlsearchparams_test.go:12
↓ 2 callers
Method
doCancel
()
eventloop/eventloop.go:494
↓ 2 callers
Method
ensureWithinFloat32Range
(value float64)
buffer/buffer.go:1055
↓ 2 callers
Method
ensureWithinInt16Range
(value int64)
buffer/buffer.go:1061
↓ 2 callers
Method
ensureWithinInt32Range
(value int64)
buffer/buffer.go:1067
↓ 2 callers
Method
ensureWithinIntRange
ensureWithinIntRange checks to make sure that value is within the integer range defined by the byteLength. Note that byteLength can be at most 6 bytes
buffer/buffer.go:1076
↓ 2 callers
Method
ensureWithinUInt16Range
(value int64)
buffer/buffer.go:1087
↓ 2 callers
Method
ensureWithinUInt32Range
(value int64)
buffer/buffer.go:1093
↓ 2 callers
Method
ensureWithinUIntRange
ensureWithinUIntRange checks to make sure that value is within the unsigned integer range defined by the byteLength. Note that byteLength can be at mo
buffer/buffer.go:1102
↓ 2 callers
Function
escape
(s string, table *[128]byte, spaceToPlus bool)
url/escape.go:55
next →
1–100 of 467, ranked by callers