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 normalizePhoneValues(ab, country, ddd, save) { | |
ab.people().forEach((person) => { | |
const name = person.name() | |
person.phones().forEach((phone) => { | |
const oldValue = phone.value() | |
if (!oldValue.startsWith('+')) { | |
let newValue = oldValue.replace(/\D/g, '') | |
if (newValue.startsWith('0')) { | |
newValue = newValue.substr(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
#!/usr/bin/env bash | |
a2l() { | |
jq '.[] | (.name, .value)' <<-EOF | |
[ | |
{ "name": "x", "value": "v1 vv1" }, | |
{ "name": "y", "value": "v2 vv2" }, | |
{ "name": "z", "value": "v3 vv3" } | |
] | |
EOF |
OlderNewer