Created
April 30, 2014 15:34
-
-
Save mishak87/4342b3fd59f24b69d895 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// go to http://bower-component-list.herokuapp.com/ | |
// include jQuery | |
var | |
data, | |
dots = 0, | |
dashes = 0; | |
jQuery.get('http://bower-component-list.herokuapp.com/', function (payload) { | |
data = payload; | |
}); | |
for (var i = data.length; i-- > 0;) { | |
if (data[i].name.indexOf('.') > -1) dots++; | |
if (data[i].name.indexOf('-') > -1) dashes++; | |
} | |
console.log({ | |
dots: dots, | |
dashes: dashes, | |
total: data.length | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment