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
{ | |
"ios": { | |
"debug": { | |
"codeSignIdentity": "iPhone Developer", | |
"developmentTeam": "TEAM_ID", | |
"packageType": "development", | |
"provisioningProfile": "PROVISIONING_PROFILE_UUID" | |
}, | |
"release": { | |
"codeSignIdentity": "iPhone Distribution", |
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
let myTransform; | |
myTransform = "translate(100,200) scale(1)"; | |
myTransform = myTransform.replace(/(.*?translate\()(.*?)(,)(.*?)(\).*)/, (all:string, prefix:string, x:string, comma:string, y:string, suffix:string) => | |
{ | |
return `${prefix}${~~x+100}${comma}${~~y+100}${suffix}`; | |
}); | |
console.log(myTransform); // Output: "translate(200,300) scale(1)" |
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 phpToMoment(str) { | |
let replacements = { | |
'd' : 'DD', | |
'D' : 'ddd', | |
'j' : 'D', | |
'l' : 'dddd', | |
'N' : 'E', | |
'S' : 'o', | |
'w' : 'e', |
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
// Converts and filters a comma delimited string into an Array of valid database ID numbers, e.g. ",x,1,,0,~,4,5,7" => "1,4,5,7" | |
let ids = str.split(',').map(keywordId => ~~keywordId).filter(keywordId => keywordId) |