MCPcopy Index your code
hub / github.com/nodejs/node / hasMethod

Function hasMethod

lib/internal/streams/iter/pull.js:80–82  ·  view source on GitHub ↗

* Check if a value is a Writer (has write method). * @returns {boolean}

(value, name)

Source from the content-addressed store, hash-verified

78 * @returns {boolean}
79 */
80function hasMethod(value, name) {
81 return typeof value?.[name] === 'function';
82}
83
84/**
85 * Parse pipeTo/pipeToSync arguments: [...transforms, writer, options?]

Callers 1

parsePipeToArgsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…