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

Function __range__

app/views/user/AllCoursesCertificatesView.js:256–264  ·  view source on GitHub ↗
(left, right, inclusive)

Source from the content-addressed store, hash-verified

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

Callers 1

hashStringMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected