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 widget = new ListWidget(); | |
| const storeInfo = await getClosestStore(); | |
| const storeId = storeInfo.storeNumber; | |
| const storeCapacity = await fetchAmountOfPaper(); | |
| const mapsAddress = 'https://maps.apple.com/?daddr=' + encodeURIComponent(storeInfo.address.street) + ',' + encodeURIComponent(storeInfo.address.city) + '&dirflg=d' | |
| widget.url = mapsAddress; | |
| await createWidget(); |
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 CC_REGEX = /^[a-z]{2}$/i; | |
| const OFFSET = 127397; | |
| function toEmoji(cc) { | |
| if (!CC_REGEX.test(cc)) { | |
| const type = typeof cc; | |
| throw new TypeError( | |
| `cc argument must be an ISO 3166-1 alpha-2 string, but got '${ | |
| type === 'string' ? cc : type | |
| }' instead.`, |