MCPcopy Index your code
hub / github.com/jquery-form/form / arrayCount

Function arrayCount

test/test.js:6–14  ·  view source on GitHub ↗
(arr, key)

Source from the content-addressed store, hash-verified

4
5// helper method
6var arrayCount = function(arr, key) {
7 var count = 0;
8 for (var i = 0; i < arr.length; i++) {
9 if (arr[i].name === key) {
10 count++;
11 }
12 }
13 return count;
14};
15
16// helper method
17var arrayValue = function(arr, key) {

Callers 1

test.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected