MCPcopy Create free account
hub / github.com/apache/cassandra-nodejs-driver / readMap

Method readMap

lib/readers.js:206–215  ·  view source on GitHub ↗

* Reads an associative array of strings as keys and bytes as values * @param {Number} length * @param {Function} keyFn * @param {Function} valueFn * @returns {Object}

(length, keyFn, valueFn)

Source from the content-addressed store, hash-verified

204 * @returns {Object}
205 */
206 readMap(length, keyFn, valueFn) {
207 if (length < 0) {
208 return null;
209 }
210 const map = {};
211 for (let i = 0; i < length; i++) {
212 map[keyFn.call(this)] = valueFn.call(this);
213 }
214 return map;
215 }
216
217 /**
218 * Reads an associative array of strings as keys and string lists as values

Callers 2

readFlagsInfoMethod · 0.95
readErrorMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected