This file contains hidden or 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
| import Ember from 'ember'; | |
| export default Ember.Component.extend({ | |
| }); |
This file contains hidden or 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 `Contributors` and paste this in console | |
| function linesOfCode(addedCssSelector = '.a', removedCssSelector = '.d') { | |
| const repoName = document.querySelector('[itemprop=name] a').innerText; | |
| const getLOC = (selector) => | |
| Array.from(document.querySelectorAll(`.cmeta ${selector}`)) | |
| .reduce(((sum, element) => | |
| sum += +element.innerText.replace(',','').slice(0, -2)), 0) | |
| return `Total number of LOC in >>${repoName}<< repository is ${getLOC(addedCssSelector) - getLOC(removedCssSelector)}`; |
This file contains hidden or 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
| function removePolishChars(elem) { | |
| var regExp = /ą|ć|ę|ł|ń|ó|ś|ź|ż/gi; | |
| return elem.replace(regExp, _replace); | |
| function _replace(match, offset, string) { | |
| switch (match.toLowerCase()) { | |
| case "ą": | |
| return "a"; |