MCPcopy Create free account
hub / github.com/codecombat/codecombat / __range__

Function __range__

app/views/user/CertificatesView.js:259–267  ·  view source on GitHub ↗
(left, right, inclusive)

Source from the content-addressed store, hash-verified

257})())
258
259function __range__ (left, right, inclusive) {
260 const range = []
261 const ascending = left < right
262 const end = !inclusive ? right : ascending ? right + 1 : right - 1
263 for (let i = left; ascending ? i < end : i > end; ascending ? i++ : i--) {
264 range.push(i)
265 }
266 return range
267}
268function __guard__ (value, transform) {
269 return (typeof value !== 'undefined' && value !== null) ? transform(value) : undefined
270}

Callers 1

hashStringMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected