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
body { | |
margin: 0; | |
padding: 0; | |
} | |
img { | |
border: 0; | |
} | |
svg:not(:root) { |
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
isEquivalent = (a, b) => { | |
// Create arrays of property names | |
var aProps = Object.getOwnPropertyNames(a); | |
var bProps = Object.getOwnPropertyNames(b); | |
// If number of properties is different, | |
// objects are not equivalent | |
if (aProps.length != bProps.length) { | |
return false; | |
} | |
for (var i = 0; i < aProps.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
parsed = "João"; | |
parsed = parsed.replace(new RegExp("[ÁÀÂÃ]", "gi"), "a"); | |
parsed = parsed.replace(new RegExp("[ÉÈÊ]", "gi"), "e"); | |
parsed = parsed.replace(new RegExp("[ÍÌÎ]", "gi"), "i"); | |
parsed = parsed.replace(new RegExp("[ÓÒÔÕ]", "gi"), "o"); | |
parsed = parsed.replace(new RegExp("[ÚÙÛ]", "gi"), "u"); | |
parsed = parsed.replace(new RegExp("[Ç]", "gi"), "c"); | |
console.log(parsed); |
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
state:{ | |
form:{ | |
[state]: { | |
value: [] | |
} | |
} | |
} | |
this.setState(prevState => ({ | |
...prevState, |
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
state:{ | |
form:{ | |
[state]: { | |
value: [] | |
} | |
} | |
} | |
this.setState(prevState => ({ | |
...prevState, |
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
state:{ | |
form:{ | |
[state]: { | |
value: [] | |
} | |
} | |
} | |
this.setState(prevState => ({ | |
...prevState, |
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
const input = document.getElementById("input"); | |
function telephone(v) { | |
v = v.replace(/\D/g, ""); | |
v = v.replace(/^(\d\d)(\d)/g, "($1) $2"); | |
v = v.replace(/(\d{4})(\d)/, "$1-$2"); | |
return v | |
} | |
input.addEventListener("input", () => { |
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
a:focus, | |
input:focus, | |
textarea:focus, | |
select:focus, | |
button:focus { | |
box-shadow: 0 0 2pt 1pt rgba(179, 230, 254, 1) !important; | |
outline-color: transparent !important; | |
} |
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
input, textarea, select{ | |
box-shadow: 0 0 2pt 1pt #2d0d5e !important; | |
outline: none !important; | |
} |
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 printWeek(dataObj, elementPrint) { | |
if (dataObj.getDay() == 0) { | |
elementPrint.innerText = "Dom"; | |
} else if (dataObj.getDay() == 1) { | |
elementPrint.innerText = "Seg"; | |
} else if (dataObj.getDay() == 2) { | |
elementPrint.innerText = "Ter"; | |
} else if (dataObj.getDay() == 3) { | |
elementPrint.innerText = "Qua"; | |
} else if (dataObj.getDay() == 4) { |
NewerOlder