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 formatters = [ | |
{ pattern: /'/g, replacement: '’' }, // Replace straight quotes with smart quotes | |
{ pattern: /\s([^\s<]+)\s*$/g, replacement: '\u00A0$1' }, // Add non breaking spaces before the last word | |
] | |
const formatted = (a) => | |
formatters.reduce( | |
(a, f) => a?.toString().replace(f.pattern, f.replacement), | |
a, | |
) |
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
alias scripts="pcregrep -M '(?<=scripts\":\s)(.|\n)*?(?=\n\s*},)' package.json" |
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
export function handleize (str) { | |
return str | |
.toLowerCase() | |
.replace(/[^\w\u00C0-\u024f]+/g, '-') | |
.replace(/^-+|-+$/g, '') | |
} |
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
export function adopt(str) { | |
return str.replace(/\s([^\s<]+)\s*$/g, '\u00A0$1'); | |
} |
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
{"lastUpload":"2020-08-28T21:31:48.308Z","extensionVersion":"v3.4.3"} |
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 shopifyStores = [ | |
{name: 'Canada Web', tablePrefix: 'ca_ecomm'}, | |
{name: 'Canada Retail', tablePrefix: 'ca_retail'}, | |
{name: 'Intl. Web', tablePrefix: 'us_ecomm'}, | |
{name: 'Intl. Retail', tablePrefix: 'us_retail'} | |
]; | |
let KotnEmailsArray = [ | |
"kotn", | |
"ordinarysupply", |
NewerOlder