mkdir repo cd repo git init touch README git add README git commit -m "first commit"
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
// tests/__mocks__/browserMocks.js | |
Object.defineProperty(window, 'location', { | |
value: { | |
...window.location, | |
reload: jest.fn() | |
} | |
}); | |
// Example of use: | |
expect(window.location.reload).toHaveBeenCalled(); |
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 sum (value) { | |
sum1(value, function (value) { | |
sum2(value, function (value) { | |
sum3(value, function (value) { | |
sum4(value, function (value) { | |
sum5(value, function (value) { | |
sum6(value, function (value) { | |
sum7(value, function (value) { | |
sum8(value, function (value) { | |
sum9(value, function (value) { |
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
var quickSort = function(arr, key, reverse) { | |
reverse = reverse || false | |
if (arr.length <= 1) { | |
return arr; | |
} | |
var less = Array(), | |
greater = Array(); |
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
/** | |
* @author Daniel Moura | |
* | |
*/ | |
public enum LogType { | |
CHANGE('C', 'Change'), | |
INCLUSION('I', 'Inclusion'), | |
EXCLUSION('E', 'Exclusion') | |
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 (w, d, undefined) { | |
'use strict'; | |
var PN = (function () { | |
var exports = {}; | |
var _forEach = function (array, callback) { | |
for (var i = 0; i < array.length; i++) { |
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 _forEach (array, callback) { | |
if (array) { | |
var length = array.length; | |
for (var i = 0; i < length; i++) { | |
callback(array[i]); | |
} | |
} | |
}; | |
var links = document.querySelectorAll('a'); |
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 (w, d, undefined) { | |
'use strict'; | |
var app = (function () { | |
var exports = {}; | |
var _privateMethod = function () { | |
return 'private method'; |