MCPcopy
hub / github.com/gruns/ImmortalDB / arrayGet

Function arrayGet

src/index.js:34–39  ·  view source on GitHub ↗
(arr, index, _default = null)

Source from the content-addressed store, hash-verified

32} catch (err) {}
33
34function arrayGet (arr, index, _default = null) {
35 if (index in arr) {
36 return arr[index]
37 }
38 return _default
39}
40
41function countUniques (iterable) {
42 // A Map must be used instead of an Object because JavaScript is a

Callers 1

getMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected