MCPcopy Create free account
hub / github.com/buke/quickjs-go / js_std_unsetenv

Function js_std_unsetenv

deps/quickjs/quickjs-libc.c:1027–1037  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1025}
1026
1027static JSValue js_std_unsetenv(JSContext *ctx, JSValueConst this_val,
1028 int argc, JSValueConst *argv)
1029{
1030 const char *name;
1031 name = JS_ToCString(ctx, argv[0]);
1032 if (!name)
1033 return JS_EXCEPTION;
1034 unsetenv(name);
1035 JS_FreeCString(ctx, name);
1036 return JS_UNDEFINED;
1037}
1038
1039/* return an object containing the list of the available environment
1040 variables. */

Callers

nothing calls this directly

Calls 2

JS_ToCStringFunction · 0.85
unsetenvFunction · 0.85

Tested by

no test coverage detected