How to use the Range function from immutable
Find comprehensive JavaScript immutable.Range code examples handpicked from public code repositorys.
GitHub: staltz/flux-challenge
6696 6697 6698 6699 6700 6701 6702 6703 6704 6705
}); return util_1.assoc(state, { sithCache: newCache.asImmutable() }); } function _modifySithIDs(state, n, f) { var sithIDs = state.sithIDs; immutable_1.Range(0, n).forEach(function () { sithIDs = f(sithIDs); }); return cleanCache(discoverSiths(util_1.assoc(state, { sithIDs: sithIDs }))); }
223
0
0
GitHub: Juanc1to/rivulet
7 8 9 10 11 12 13 14 15 16
router.get('/:id', function (req, res) { const watershed_id = req.params.id; const user_id = req.session.i7e.get('user_id'); const summary = watersheds.summary(req.app.get('db'), watershed_id); let reports_by_level = Map(); Range(0, summary.get('progression_level') + 1).reverse().forEach( function (level) { reports_by_level = reports_by_level.set(level, List()); }); summary.get('reports').forEach(function (report) {
1
1
2
immutable.Map is the most popular function in immutable (1575 examples)