Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/dop251/goja
/ functions
Functions
4,701 in github.com/dop251/goja
⨍
Functions
4,701
◇
Types & classes
735
↓ 460 callers
Function
testScript
(script string, expectedResult Value, t *testing.T)
compiler_test.go:233
↓ 433 callers
Method
emit
(instructions ...instruction)
compiler.go:1274
↓ 409 callers
Method
Argument
(idx int)
object.go:258
↓ 363 callers
Method
putStr
(name unistring.String, f templatePropFactory)
object_template.go:52
↓ 330 callers
Function
intToValue
(i int64)
vm.go:392
↓ 314 callers
Function
New
New creates an instance of a Javascript runtime that can be used to run code. Multiple instances may be created and used simultaneously, however it is
runtime.go:1297
↓ 312 callers
Method
NewTypeError
(args ...interface{})
runtime.go:540
↓ 306 callers
Method
Set
Set an item at index idx. Note that idx may be any integer, negative or beyond the current length. The expected behaviour when it's beyond length is t
object_dynamic.go:57
↓ 268 callers
Method
RunString
RunString executes the given string in the global context.
runtime.go:1397
↓ 252 callers
Method
methodProp
(f func(FunctionCall) Value, name unistring.String, nArgs int)
runtime.go:3205
↓ 233 callers
Method
String
()
value.go:82
↓ 212 callers
Method
toObject
(v Value, args ...interface{})
runtime.go:2618
↓ 176 callers
Method
getStr
(p unistring.String, receiver Value)
object.go:153
↓ 144 callers
Method
Idx0
()
ast/node.go:28
↓ 141 callers
Function
valueProp
(value Value, writable, enumerable, configurable bool)
object.go:795
↓ 137 callers
Method
_putProp
(name unistring.String, value Value, writable, enumerable, configurable bool)
object.go:208
↓ 133 callers
Method
newNativeFunc
(call func(FunctionCall) Value, name unistring.String, length int)
runtime.go:739
↓ 132 callers
Method
toString
()
value.go:79
↓ 121 callers
Method
ToObject
(*Runtime)
value.go:86
↓ 118 callers
Method
WriteString
(s String)
string_unicode.go:213
↓ 117 callers
Function
is
(a, b interface{})
parser/testutil_test.go:43
↓ 114 callers
Method
ToValue
* ToValue converts a Go value into a JavaScript value of a most appropriate type. Structural types (such as structs, maps and slices) are wrapped so t
runtime.go:1790
↓ 110 callers
Method
emitGetter
(putOnStack bool)
compiler_expr.go:13
↓ 106 callers
Function
testScriptWithTestLib
(script string, expectedResult Value, t *testing.T)
compiler_test.go:237
↓ 103 callers
Method
typeErrorResult
(throw bool, args ...interface{})
runtime.go:461
↓ 102 callers
Method
Idx1
The index of the first character belonging to the node
ast/node.go:29
↓ 98 callers
Method
setOwnStr
(p unistring.String, v Value, throw bool)
object.go:161
↓ 96 callers
Method
ToInteger
()
value.go:78
↓ 96 callers
Method
push
(v Value)
vm.go:891
↓ 94 callers
Method
init
(Value)
vm.go:120
↓ 93 callers
Method
objectproto_toString
(call FunctionCall)
builtin_object.go:458
↓ 91 callers
Method
next
()
parser/parser.go:222
↓ 86 callers
Method
getIdx
(p valueInt, receiver Value)
object.go:154
↓ 85 callers
Function
nilSafe
(v Value)
runtime.go:2854
↓ 81 callers
Method
get
()
vm.go:118
↓ 76 callers
Method
set
(Value)
vm.go:119
↓ 74 callers
Method
expect
(value token.Token)
parser/parser.go:257
↓ 73 callers
Method
ExportTo
ExportTo converts a JavaScript value into the specified Go value. The second parameter must be a non-nil pointer. Returns error if conversion is not p
runtime.go:2379
↓ 72 callers
Method
string
()
value.go:80
↓ 70 callers
Method
read
()
parser/lexer.go:534
↓ 69 callers
Method
ToFloat
()
value.go:83
↓ 65 callers
Method
Get
Get an item at index idx. Note that idx may be any integer, negative or beyond the current length.
object_dynamic.go:53
↓ 65 callers
Method
error
(place interface{}, msg string, msgValues ...interface{})
parser/error.go:72
↓ 62 callers
Function
floatToValue
(f float64)
vm.go:409
↓ 60 callers
Method
Export
()
value.go:90
↓ 59 callers
Method
compileExpression
(v ast.Expression)
compiler_expr.go:205
↓ 58 callers
Method
addSrcMap
()
compiler_expr.go:19
↓ 58 callers
Method
ensureNotDetached
(throw bool)
typedarrays.go:1073
↓ 58 callers
Function
toLength
(v Value)
runtime.go:1202
↓ 57 callers
Method
Length
()
string.go:60
↓ 56 callers
Function
toIntStrict
(i int64)
runtime.go:1255
↓ 55 callers
Method
SameAs
(Value)
value.go:87
↓ 54 callers
Function
newStringValue
(s string)
string.go:134
↓ 53 callers
Method
ToBoolean
()
value.go:85
↓ 50 callers
Method
w
()
destruct.go:29
↓ 48 callers
Method
Len
Len returns the current array length.
object_dynamic.go:51
↓ 47 callers
Method
WriteRune
(r rune)
string_unicode.go:255
↓ 47 callers
Method
newArrayValues
(values []Value)
builtin_array.go:68
↓ 47 callers
Method
toObject
(*Runtime)
proxy.go:146
↓ 46 callers
Method
StrictEquals
(Value)
value.go:89
↓ 46 callers
Method
ToNumber
()
value.go:84
↓ 45 callers
Method
assertCallable
()
object.go:185
↓ 44 callers
Method
NewObject
()
runtime.go:523
↓ 40 callers
Method
New
New is an equivalent of the 'new' operator allowing to call it directly from Go.
runtime.go:2455
↓ 39 callers
Function
Compile
Compile creates an internal representation of the JavaScript code that can be later run using the Runtime.RunProgram() method. This representation is
runtime.go:1306
↓ 38 callers
Method
defineOwnPropertyStr
(name unistring.String, desc PropertyDescriptor, throw bool)
object.go:177
↓ 37 callers
Method
getRangeError
()
builtin_error.go:276
↓ 37 callers
Method
throwSyntaxError
(offset int, msg string)
compiler.go:1278
↓ 37 callers
Method
toCallable
(v Value)
runtime.go:994
↓ 36 callers
Method
checkObjectCoercible
(v Value)
runtime.go:1002
↓ 35 callers
Method
RunProgram
RunProgram executes a pre-compiled (see Compile()) code in the global context.
runtime.go:1434
↓ 34 callers
Method
assert
(cond bool, offset int, msg string, args ...interface{})
compiler.go:1368
↓ 33 callers
Method
newError
(typ *Object, msg string)
runtime.go:467
↓ 30 callers
Method
getOwnPropStr
(unistring.String)
object.go:157
↓ 30 callers
Method
isSet
()
date.go:110
↓ 30 callers
Function
marshal
(name string, children ...interface{})
parser/marshal_test.go:13
↓ 30 callers
Method
slice
(idx0, idx1 file.Idx)
parser/parser.go:201
↓ 30 callers
Method
throw
Calls to this method must be made from the run() loop and must be the last statement before 'return'. In all other cases exceptions must be thrown usi
vm.go:848
↓ 30 callers
Function
toNumeric
(value Value)
vm.go:426
↓ 29 callers
Method
CharAt
(int)
string.go:59
↓ 29 callers
Method
Set
(name string, value interface{})
value.go:904
↓ 28 callers
Method
Substring
(start, end int)
string.go:62
↓ 28 callers
Method
toIndex
(v Value)
runtime.go:1276
↓ 28 callers
Function
toPropertyKey
(key Value)
runtime.go:2683
↓ 27 callers
Method
_putSym
(s *Symbol, prop Value)
object.go:209
↓ 26 callers
Method
deleteStr
(name unistring.String, throw bool)
object.go:181
↓ 25 callers
Method
Error
()
runtime.go:396
↓ 25 callers
Method
checkHandler
()
proxy.go:294
↓ 25 callers
Function
stringValueFromRaw
(raw unistring.String)
string.go:141
↓ 24 callers
Method
String
()
string_unicode.go:274
↓ 24 callers
Method
time
()
date.go:118
↓ 24 callers
Function
toMethod
(v Value)
object.go:1407
↓ 23 callers
Function
MustCompile
MustCompile is like Compile but panics if the code cannot be compiled. It simplifies safe initialization of global variables holding compiled JavaScri
runtime.go:1319
↓ 23 callers
Method
createIterResultObject
(value Value, done bool)
runtime.go:2821
↓ 23 callers
Method
emitExpr
(expr compiledExpr, putOnStack bool)
compiler_expr.go:3285
↓ 23 callers
Method
hasOwnPropertyStr
(unistring.String)
object.go:173
↓ 23 callers
Method
read
()
parser/regexp.go:94
↓ 23 callers
Method
setOwnIdx
(p valueInt, v Value, throw bool)
object.go:162
↓ 22 callers
Method
getSym
(p *Symbol, receiver Value)
object.go:155
↓ 22 callers
Function
newParser
(filename, src string)
parser/parser.go:126
next →
1–100 of 4,701, ranked by callers