MCPcopy Create free account
hub / github.com/krasimir/react-in-patterns / addUpUntilIndex

Function addUpUntilIndex

code/styling/public/app.js:20255–20262  ·  view source on GitHub ↗
(sizes, index)

Source from the content-addressed store, hash-verified

20253
20254/* add up all numbers in array up until and including the index */
20255var addUpUntilIndex = function addUpUntilIndex(sizes, index) {
20256 var totalUpToIndex = 0;
20257 for (var i = 0; i <= index; i += 1) {
20258 totalUpToIndex += sizes[i];
20259 }
20260
20261 return totalUpToIndex;
20262};
20263
20264/* create a new style tag after lastEl */
20265var makeStyleTag = function makeStyleTag(target, tagEl, insertBefore) {

Callers 2

insertRulesFunction · 0.85
removeRulesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected