MCPcopy Create free account
hub / github.com/GoogleCloudPlatform/nodejs-docs-samples / lookup

Method lookup

vision/textDetection.js:96–102  ·  view source on GitHub ↗

* Lookup files that contain a given set of words in redis * @param {string[]} words An array of words to lookup * @returns {Promise } Words and their arrays of matching filenames

(words)

Source from the content-addressed store, hash-verified

94 * @returns {Promise<string[][]>} Words and their arrays of matching filenames
95 */
96 async lookup(words) {
97 return Promise.all(
98 words
99 .map(word => word.toLowerCase())
100 .map(word => this.tokenClient.sMembers(word))
101 );
102 }
103
104 /**
105 * Check to see if a Document is already stored in redis.

Callers 1

lookupFunction · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected