MCPcopy Create free account
hub / github.com/dop251/goja / ToNumber

Method ToNumber

string_imported.go:78–84  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

76}
77
78func (i *importedString) ToNumber() Value {
79 i.ensureScanned()
80 if i.u != nil {
81 return i.u.ToNumber()
82 }
83 return asciiString(i.s).ToNumber()
84}
85
86func (i *importedString) ToBoolean() bool {
87 return len(i.s) != 0

Callers

nothing calls this directly

Calls 3

ensureScannedMethod · 0.95
asciiStringTypeAlias · 0.85
ToNumberMethod · 0.65

Tested by

no test coverage detected