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 function creditCardMask(num: string) { | |
num = num.replace(/[^0-9]/g, ""); | |
num = num.replace(/(\d{4})(\d)/, "$1 $2"); | |
num = num.replace(/(\d{4})(\d)/, "$1 $2"); | |
num = num.replace(/(\d{4})(\d)/, "$1 $2"); | |
return num; | |
} | |
export function cpfMask(num: string) { | |
num = num.replace(/[^0-9]/g, ""); |
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
{ | |
"html": [ | |
{ | |
"title": "Todas as tags", | |
"status": false | |
}, | |
{ | |
"title": "Semântica", | |
"status": false | |
}, |
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
function validateOfferMan(){ | |
var bonusPL = document.getElementById("inputbonusPL").checked; | |
var bonusRescue = document.getElementById("inputbonusRescue").checked; | |
var bonusMonths = document.getElementById("inputbonusMonths").checked; | |
var offer10da = document.getElementById("inputOffer10da").checked; | |
var bonus1real = document.getElementById("inputBonus1real").checked; | |
var offerPoints = document.getElementById("inputofferPoints").checked; | |
var offers = bonusPL + bonusRescue + bonusMonths + offer10da + bonus1real + offerPoints; |
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
function myFunction() { | |
let a = 2; | |
function otherFunction() { | |
console.log( a + b ); | |
} | |
otherFunction(); | |
} | |
let b = 3; | |
myFunction(); // 5 |
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
function myFunction() { | |
let a = b; | |
console.log(a); | |
} | |
myFunction(); // Reference Error |
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
function myFunction() { | |
let a = 42; | |
} | |
myFunction(); | |
console.log(a); // Reference Error |
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
function myFunction() { | |
a = 42; | |
console.log(a); | |
} | |
myFunction(); // 42 |
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
(function(win, doc){ | |
'use strict'; | |
const $ = document.querySelector.bind(document); | |
const $url = "https://en.wikipedia.org/w/api.php?&origin=*&action=opensearch&namespace=0&limit=50&search="; | |
const $input_search = $('.input-search'); | |
const $button_search = $('.button-search'); | |
const $result_list = $('.results'); | |
let results = []; |
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
(function(win, doc){ | |
'use strict'; | |
let formAdress = { | |
cep: doc.querySelector('[data-js="cep"]'), | |
state: doc.querySelector('[data-js="state"]'), | |
city: doc.querySelector('[data-js="city"]'), | |
street: doc.querySelector('[data-js="street"]'), | |
district: doc.querySelector('[data-js="district"]') | |
} |
NewerOlder