MCPcopy Create free account
hub / github.com/nodejs/node / has

Function has

lib/internal/process/permission.js:33–45  ·  view source on GitHub ↗
(scope, reference)

Source from the content-addressed store, hash-verified

31 return _audit;
32 },
33 has(scope, reference) {
34 validateString(scope, 'scope');
35 if (reference != null) {
36 // TODO: add support for WHATWG URLs and Uint8Arrays.
37 if (isBuffer(reference)) {
38 validateBuffer(reference, 'reference');
39 } else {
40 validateString(reference, 'reference');
41 }
42 }
43
44 return permission.has(scope, reference);
45 },
46 drop(scope, reference) {
47 validateString(scope, 'scope');
48 if (reference != null) {

Callers

nothing calls this directly

Calls 2

hasMethod · 0.65
isBufferFunction · 0.50

Tested by

no test coverage detected