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 maskCard = (str)=> | |
str.replace(/\b(?:\d{4}[ - ]?){3}(?=\d{4}\b)/gm,'#### #### ####'); | |
maskCard('visa 1234 3456 4567 5678') | |
// 'visa #### #### ####5678' |
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 Enum = (function(foo) { | |
var EnumItem = function(item){ | |
if(typeof item == "string"){ | |
this.name = item; | |
} else { | |
this.name = item.name; | |
} | |
} | |
EnumItem.prototype = new String("DEFAULT"); | |
EnumItem.prototype.toString = function(){ |
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
utils.define("persontest",function(persontest,_person_){ | |
var person = utils.module("person"); | |
var person_form = utils.module("person_form"); | |
persontest._ready_ = function(){ | |
this.person = person.instance().init($("#person_module")); | |