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
/*Filtragem do conteúdo*/ | |
/*function filterItemsTable(e, table) { | |
return () => { | |
function tableGetRows(table) { | |
Array.prototype.forEach.call(table.rows, (filter)); | |
} | |
tableGetRows(table) |
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
const browserSupportsAllFeatures = () => window.Promise && window.fetch && window.Symbol | |
const loadScript = (src = '', done) => { | |
var js = document.createElement('script') | |
js.src = src | |
document.head.appendChild(js) | |
return done() | |
} |
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
var XML_CHARACTER_MAP = { | |
'&': '&', | |
'"': '"', | |
"'": ''', | |
'<': '<', | |
'>': '>' | |
}; | |
function escapeForXML(string) { |
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
const conditional = () => ({ | |
conditionOne: 'result', | |
conditionTwo: 'result' | |
}) | |
conditional()['condition'] |
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
const conditional = () => ({ | |
conditionOne: 'result', | |
conditionTwo: 'result' | |
}) | |
conditional()['conditionOne'] || 'default value' |
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
const condition = true; | |
const App = () => ( | |
<div> | |
<h1>This is always visible</h1> | |
{ | |
condition && ( | |
<div> | |
<h2>Show me</h2> | |
<p>Description</p> |
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
export const pipe = (...fns) => initial => fns.reduce((acc, fn) => fn(acc), initial) |
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
const memoize = (fn) => { | |
let cache = {}, key; | |
return (...args) => { | |
key = JSON.stringify(args); | |
return cache[key] || (cache[key] = fn.call(null, ...args)); | |
} | |
}; |
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
const max = arr => Math.max(...arr) | |
const calc = len => (len / 2 + 1) | |
const floor = num => Math.floor(num) | |
const add = arr => item => arr.push(item) | |
const slice = arr => start => end => arr.slice(start, end) |
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
const debounce = (fn = () => {}, wait = 1000) => (...args) => { | |
const delayed = () => fn.apply(this, args) | |
return setTimeout(delayed, wait) | |
} |
OlderNewer