MCPcopy Index your code
hub / github.com/codeceptjs/CodeceptJS / toArray

Function toArray

lib/command/query.js:210–214  ·  view source on GitHub ↗
(v)

Source from the content-addressed store, hash-verified

208}
209
210function toArray(v) {
211 if (Array.isArray(v)) return v
212 if (v == null || v === '' || typeof v === 'boolean' || typeof v === 'number') return []
213 return [v]
214}
215
216function quote(s) {
217 return `'${String(s).replace(/'/g, "\\'")}'`

Callers 1

queryFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected