^(55)?(?:([1-9]{2})?)(\d{4,5})(\d{4})$
const regex = /^(55)?(?:([1-9]{2})?)(\d{4,5})(\d{4})$/;| const DEFAULT_TIMEOUT = 3000; | |
| function request(resource, options = {}) { | |
| const { timeout = DEFAULT_TIMEOUT } = options; | |
| delete options.timeout; | |
| return fetch(resource, { ...options, signal: AbortSignal.timeout(timeout) }); | |
| } | |
| export default request; |
| import { parse } from 'https://deno.land/std/flags/mod.ts'; | |
| import readFileHelp from './read_file_help.ts'; | |
| import readFileList from './read_file_list.ts'; | |
| import readFileOutdated from './read_file_outdated.ts'; | |
| import readFileUpdate from './read_file_update.ts'; | |
| const args = parse(Deno.args); | |
| let arg; |
| export const updateParameter = (uri = '/', key, value) => { | |
| const hasQueries = uri.includes('?'); | |
| const hasHash = uri.includes('#'); | |
| let hash = ''; | |
| if (hasHash) { | |
| hash = uri.substr(uri.indexOf('#')); | |
| uri = uri.substr(0, uri.indexOf('#')); | |
| } | |
| let queries = ''; |