WIP: feat(node_api): Add missing functions #7

Closed
abhisekp wants to merge 6 commits from abhisekp/feat-missing-functions into main
8 changed files with 1141 additions and 5 deletions
Showing only changes of commit 18516962f8 - Show all commits

View File

@ -19,3 +19,30 @@ const (
ValueTypeExternal ValueType = C.napi_external
ValueTypeBigint ValueType = C.napi_bigint
)
func (v ValueType) String() string {
switch v {
case ValueTypeUndefined:
return "undefined"
case ValueTypeNull:
return "null"
case ValueTypeBoolean:
return "boolean"
case ValueTypeNumber:
return "number"
case ValueTypeString:
return "string"
case ValueTypeSymbol:
return "symbol"
case ValueTypeObject:
return "object"
case ValueTypeFunction:
return "function"
case ValueTypeExternal:
return "external"
case ValueTypeBigint:
return "bigint"
default:
return "undefined"
}
}