[{"data":1,"prerenderedAt":802,"buildId":803},["ShallowReactive",2],{"docs-navigation-en":3,"example-\u002Fexamples\u002Fcompany-page":30,"example-surround-\u002Fexamples\u002Fcompany-page":711,"examples-en":721},[4],{"title":5,"path":6,"stem":7,"children":8,"page":29},"Docs","\u002Fdocs","docs",[9,13,17,21,25],{"title":10,"path":11,"stem":12},"Getting started","\u002Fdocs\u002Fgetting-started","docs\u002F1.getting-started",{"title":14,"path":15,"stem":16},"In the browser and with frameworks","\u002Fdocs\u002Fin-the-browser","docs\u002F2.in-the-browser",{"title":18,"path":19,"stem":20},"Input rules","\u002Fdocs\u002Finput-rules","docs\u002F3.input-rules",{"title":22,"path":23,"stem":24},"Compared with libphonenumber","\u002Fdocs\u002Flibphonenumber","docs\u002F4.libphonenumber",{"title":26,"path":27,"stem":28},"Data and sources","\u002Fdocs\u002Fdata-and-sources","docs\u002F5.data-and-sources",false,{"id":31,"title":32,"body":33,"category":691,"demo":702,"description":703,"extension":704,"meta":705,"navigation":115,"order":119,"path":706,"seo":707,"stem":708,"uses":709,"__hash__":710},"examples_en\u002Fexamples\u002Fcompany-page.md","List the numbers on a company page",{"type":34,"value":35,"toc":698},"minimark",[36,41,50,56,60,683,686,694],[37,38,40],"h2",{"id":39},"how-it-works","How it works",[42,43,44,45,49],"p",{},"A page often shows the same number twice: once for domestic callers and once in international form. Use ",[46,47,48],"code",{},"digits"," as the key to keep each number once.",[42,51,52,55],{},[46,53,54],{},"extract"," does not tell TEL from FAX. When you need that, read the words just before each number in your own code.",[37,57,59],{"id":58},"in-each-language","In each language",[61,62,63,269,404],"code-group",{},[64,65,71],"pre",{"className":66,"code":67,"filename":68,"language":69,"meta":70,"style":70},"language-js shiki shiki-themes material-theme-lighter github-light github-dark","import { extract } from \"@kurashina-design\u002Fjapan-phone\";\n\n\u002F\u002F The contact section of a company page. The same number appears twice in different notations.\nconst page = `本社 TEL 03-5253-8111 \u002F FAX 03-5253-8112\nFrom overseas: +81-3-5253-8111\n福岡支店 TEL 092-513-5612`;\n\nconst unique = new Map();\nfor (const number of extract(page)) unique.set(number.digits, number);\nfor (const number of unique.values()) console.log(number.national);\n","Node.js","js","",[46,72,73,110,117,124,145,151,162,167,189,232],{"__ignoreMap":70},[74,75,78,82,86,90,93,96,100,104,107],"span",{"class":76,"line":77},"line",1,[74,79,81],{"class":80},"sVHd0","import",[74,83,85],{"class":84},"sP7_E"," {",[74,87,89],{"class":88},"su5hD"," extract",[74,91,92],{"class":84}," }",[74,94,95],{"class":80}," from",[74,97,99],{"class":98},"sjJ54"," \"",[74,101,103],{"class":102},"s_sjI","@kurashina-design\u002Fjapan-phone",[74,105,106],{"class":98},"\"",[74,108,109],{"class":84},";\n",[74,111,113],{"class":76,"line":112},2,[74,114,116],{"emptyLinePlaceholder":115},true,"\n",[74,118,120],{"class":76,"line":119},3,[74,121,123],{"class":122},"sutJx","\u002F\u002F The contact section of a company page. The same number appears twice in different notations.\n",[74,125,127,131,135,139,142],{"class":76,"line":126},4,[74,128,130],{"class":129},"sbsja","const",[74,132,134],{"class":133},"s_hVV"," page",[74,136,138],{"class":137},"smGrS"," =",[74,140,141],{"class":98}," `",[74,143,144],{"class":102},"本社 TEL 03-5253-8111 \u002F FAX 03-5253-8112\n",[74,146,148],{"class":76,"line":147},5,[74,149,150],{"class":102},"From overseas: +81-3-5253-8111\n",[74,152,154,157,160],{"class":76,"line":153},6,[74,155,156],{"class":102},"福岡支店 TEL 092-513-5612",[74,158,159],{"class":98},"`",[74,161,109],{"class":84},[74,163,165],{"class":76,"line":164},7,[74,166,116],{"emptyLinePlaceholder":115},[74,168,170,172,175,177,180,184,187],{"class":76,"line":169},8,[74,171,130],{"class":129},[74,173,174],{"class":133}," unique",[74,176,138],{"class":137},[74,178,179],{"class":137}," new",[74,181,183],{"class":182},"sGLFI"," Map",[74,185,186],{"class":88},"()",[74,188,109],{"class":84},[74,190,192,195,198,200,203,206,208,211,214,217,220,222,224,227,230],{"class":76,"line":191},9,[74,193,194],{"class":80},"for",[74,196,197],{"class":88}," (",[74,199,130],{"class":129},[74,201,202],{"class":133}," number",[74,204,205],{"class":137}," of",[74,207,89],{"class":182},[74,209,210],{"class":88},"(page)) unique",[74,212,213],{"class":84},".",[74,215,216],{"class":182},"set",[74,218,219],{"class":88},"(number",[74,221,213],{"class":84},[74,223,48],{"class":88},[74,225,226],{"class":84},",",[74,228,229],{"class":88}," number)",[74,231,109],{"class":84},[74,233,235,237,239,241,243,245,247,249,252,255,257,260,262,264,267],{"class":76,"line":234},10,[74,236,194],{"class":80},[74,238,197],{"class":88},[74,240,130],{"class":129},[74,242,202],{"class":133},[74,244,205],{"class":137},[74,246,174],{"class":88},[74,248,213],{"class":84},[74,250,251],{"class":182},"values",[74,253,254],{"class":88},"()) console",[74,256,213],{"class":84},[74,258,259],{"class":182},"log",[74,261,219],{"class":88},[74,263,213],{"class":84},[74,265,266],{"class":88},"national)",[74,268,109],{"class":84},[64,270,275],{"className":271,"code":272,"filename":273,"language":274,"meta":70,"style":70},"language-python shiki shiki-themes material-theme-lighter github-light github-dark","from japan_phone import extract\n\n# The contact section of a company page. The same number appears twice in different notations.\npage = \"\"\"本社 TEL 03-5253-8111 \u002F FAX 03-5253-8112\nFrom overseas: +81-3-5253-8111\n福岡支店 TEL 092-513-5612\"\"\"\n\nunique = {number.digits: number for number in extract(page)}\nfor number in unique.values():\n    print(number.national)\n","Python","python",[46,276,277,290,294,299,312,316,323,327,369,386],{"__ignoreMap":70},[74,278,279,282,285,287],{"class":76,"line":77},[74,280,281],{"class":80},"from",[74,283,284],{"class":88}," japan_phone ",[74,286,81],{"class":80},[74,288,289],{"class":88}," extract\n",[74,291,292],{"class":76,"line":112},[74,293,116],{"emptyLinePlaceholder":115},[74,295,296],{"class":76,"line":119},[74,297,298],{"class":122},"# The contact section of a company page. The same number appears twice in different notations.\n",[74,300,301,304,307,310],{"class":76,"line":126},[74,302,303],{"class":88},"page ",[74,305,306],{"class":137},"=",[74,308,309],{"class":98}," \"\"\"",[74,311,144],{"class":102},[74,313,314],{"class":76,"line":147},[74,315,150],{"class":102},[74,317,318,320],{"class":76,"line":153},[74,319,156],{"class":102},[74,321,322],{"class":98},"\"\"\"\n",[74,324,325],{"class":76,"line":164},[74,326,116],{"emptyLinePlaceholder":115},[74,328,329,332,334,336,339,341,344,347,350,352,354,357,360,363,366],{"class":76,"line":169},[74,330,331],{"class":88},"unique ",[74,333,306],{"class":137},[74,335,85],{"class":84},[74,337,338],{"class":88},"number",[74,340,213],{"class":84},[74,342,48],{"class":343},"skxfh",[74,345,346],{"class":84},":",[74,348,349],{"class":88}," number ",[74,351,194],{"class":80},[74,353,349],{"class":88},[74,355,356],{"class":80},"in",[74,358,89],{"class":359},"slqww",[74,361,362],{"class":84},"(",[74,364,365],{"class":359},"page",[74,367,368],{"class":84},")}\n",[74,370,371,373,375,377,379,381,383],{"class":76,"line":191},[74,372,194],{"class":80},[74,374,349],{"class":88},[74,376,356],{"class":80},[74,378,174],{"class":88},[74,380,213],{"class":84},[74,382,251],{"class":359},[74,384,385],{"class":84},"():\n",[74,387,388,392,394,396,398,401],{"class":76,"line":234},[74,389,391],{"class":390},"sptTA","    print",[74,393,362],{"class":84},[74,395,338],{"class":359},[74,397,213],{"class":84},[74,399,400],{"class":343},"national",[74,402,403],{"class":84},")\n",[64,405,410],{"className":406,"code":407,"filename":408,"language":409,"meta":70,"style":70},"language-java shiki shiki-themes material-theme-lighter github-light github-dark","import jp.kurashina.japanphone.JapanPhoneNumber;\nimport jp.kurashina.japanphone.JapanPhone;\nimport java.util.LinkedHashMap;\nimport java.util.Map;\n\n\u002F\u002F The contact section of a company page. The same number appears twice in different notations.\nString page = \"本社 TEL 03-5253-8111 \u002F FAX 03-5253-8112\\n\"\n    + \"From overseas: +81-3-5253-8111\\n\"\n    + \"福岡支店 TEL 092-513-5612\";\n\nMap\u003CString, JapanPhoneNumber> unique = new LinkedHashMap\u003C>();\nfor (JapanPhoneNumber number : JapanPhone.extract(page)) unique.put(number.getDigits(), number);\nfor (JapanPhoneNumber number : unique.values()) System.out.println(number.getNational());\n","Java","java",[46,411,412,438,459,478,495,499,503,524,538,550,554,585,636],{"__ignoreMap":70},[74,413,414,417,421,423,426,428,431,433,436],{"class":76,"line":77},[74,415,81],{"class":416},"sw1J6",[74,418,420],{"class":419},"s_bVq"," jp",[74,422,213],{"class":84},[74,424,425],{"class":419},"kurashina",[74,427,213],{"class":84},[74,429,430],{"class":419},"japanphone",[74,432,213],{"class":84},[74,434,435],{"class":419},"JapanPhoneNumber",[74,437,109],{"class":84},[74,439,440,442,444,446,448,450,452,454,457],{"class":76,"line":112},[74,441,81],{"class":416},[74,443,420],{"class":419},[74,445,213],{"class":84},[74,447,425],{"class":419},[74,449,213],{"class":84},[74,451,430],{"class":419},[74,453,213],{"class":84},[74,455,456],{"class":419},"JapanPhone",[74,458,109],{"class":84},[74,460,461,463,466,468,471,473,476],{"class":76,"line":119},[74,462,81],{"class":416},[74,464,465],{"class":419}," java",[74,467,213],{"class":84},[74,469,470],{"class":419},"util",[74,472,213],{"class":84},[74,474,475],{"class":419},"LinkedHashMap",[74,477,109],{"class":84},[74,479,480,482,484,486,488,490,493],{"class":76,"line":126},[74,481,81],{"class":416},[74,483,465],{"class":419},[74,485,213],{"class":84},[74,487,470],{"class":419},[74,489,213],{"class":84},[74,491,492],{"class":419},"Map",[74,494,109],{"class":84},[74,496,497],{"class":76,"line":147},[74,498,116],{"emptyLinePlaceholder":115},[74,500,501],{"class":76,"line":153},[74,502,123],{"class":122},[74,504,505,508,511,513,515,518,521],{"class":76,"line":164},[74,506,507],{"class":419},"String",[74,509,510],{"class":88}," page ",[74,512,306],{"class":137},[74,514,99],{"class":98},[74,516,517],{"class":102},"本社 TEL 03-5253-8111 \u002F FAX 03-5253-8112",[74,519,520],{"class":133},"\\n",[74,522,523],{"class":98},"\"\n",[74,525,526,529,531,534,536],{"class":76,"line":169},[74,527,528],{"class":137},"    +",[74,530,99],{"class":98},[74,532,533],{"class":102},"From overseas: +81-3-5253-8111",[74,535,520],{"class":133},[74,537,523],{"class":98},[74,539,540,542,544,546,548],{"class":76,"line":191},[74,541,528],{"class":137},[74,543,99],{"class":98},[74,545,156],{"class":102},[74,547,106],{"class":98},[74,549,109],{"class":84},[74,551,552],{"class":76,"line":234},[74,553,116],{"emptyLinePlaceholder":115},[74,555,557,559,562,564,566,569,572,575,577,579,582],{"class":76,"line":556},11,[74,558,492],{"class":419},[74,560,561],{"class":84},"\u003C",[74,563,507],{"class":129},[74,565,226],{"class":84},[74,567,568],{"class":129}," JapanPhoneNumber",[74,570,571],{"class":84},">",[74,573,574],{"class":88}," unique ",[74,576,306],{"class":137},[74,578,179],{"class":80},[74,580,581],{"class":419}," LinkedHashMap",[74,583,584],{"class":84},"\u003C>();\n",[74,586,588,590,592,594,596,598,601,603,605,607,609,612,614,616,619,621,623,625,628,631,633],{"class":76,"line":587},12,[74,589,194],{"class":80},[74,591,197],{"class":84},[74,593,435],{"class":419},[74,595,349],{"class":88},[74,597,346],{"class":80},[74,599,600],{"class":88}," JapanPhone",[74,602,213],{"class":84},[74,604,54],{"class":182},[74,606,362],{"class":84},[74,608,365],{"class":88},[74,610,611],{"class":84},"))",[74,613,174],{"class":88},[74,615,213],{"class":84},[74,617,618],{"class":182},"put",[74,620,362],{"class":84},[74,622,338],{"class":88},[74,624,213],{"class":84},[74,626,627],{"class":182},"getDigits",[74,629,630],{"class":84},"(),",[74,632,202],{"class":88},[74,634,635],{"class":84},");\n",[74,637,639,641,643,645,647,649,651,653,655,658,661,663,666,668,671,673,675,677,680],{"class":76,"line":638},13,[74,640,194],{"class":80},[74,642,197],{"class":84},[74,644,435],{"class":419},[74,646,349],{"class":88},[74,648,346],{"class":80},[74,650,174],{"class":88},[74,652,213],{"class":84},[74,654,251],{"class":182},[74,656,657],{"class":84},"())",[74,659,660],{"class":88}," System",[74,662,213],{"class":84},[74,664,665],{"class":88},"out",[74,667,213],{"class":84},[74,669,670],{"class":182},"println",[74,672,362],{"class":84},[74,674,338],{"class":88},[74,676,213],{"class":84},[74,678,679],{"class":182},"getNational",[74,681,682],{"class":84},"());\n",[42,684,685],{},"Output:",[64,687,692],{"className":688,"code":690,"language":691,"meta":70},[689],"language-text","03-5253-8111\n03-5253-8112\n092-513-5612\n","text",[46,693,690],{"__ignoreMap":70},[695,696,697],"style",{},"html pre.shiki code .sVHd0, html code.shiki .sVHd0{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#D73A49;--shiki-default-font-style:inherit;--shiki-dark:#F97583;--shiki-dark-font-style:inherit}html pre.shiki code .sP7_E, html code.shiki .sP7_E{--shiki-light:#39ADB5;--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .su5hD, html code.shiki .su5hD{--shiki-light:#90A4AE;--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sjJ54, html code.shiki .sjJ54{--shiki-light:#39ADB5;--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .s_sjI, html code.shiki .s_sjI{--shiki-light:#91B859;--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .sutJx, html code.shiki .sutJx{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#6A737D;--shiki-default-font-style:inherit;--shiki-dark:#6A737D;--shiki-dark-font-style:inherit}html pre.shiki code .sbsja, html code.shiki .sbsja{--shiki-light:#9C3EDA;--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .s_hVV, html code.shiki .s_hVV{--shiki-light:#90A4AE;--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .smGrS, html code.shiki .smGrS{--shiki-light:#39ADB5;--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sGLFI, html code.shiki .sGLFI{--shiki-light:#6182B8;--shiki-default:#6F42C1;--shiki-dark:#B392F0}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .skxfh, html code.shiki .skxfh{--shiki-light:#E53935;--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .slqww, html code.shiki .slqww{--shiki-light:#6182B8;--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sptTA, html code.shiki .sptTA{--shiki-light:#6182B8;--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sw1J6, html code.shiki .sw1J6{--shiki-light:#F76D47;--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .s_bVq, html code.shiki .s_bVq{--shiki-light:#9C3EDA;--shiki-default:#24292E;--shiki-dark:#E1E4E8}",{"title":70,"searchDepth":112,"depth":112,"links":699},[700,701],{"id":39,"depth":112,"text":40},{"id":58,"depth":112,"text":59},"company-page","Find TEL and FAX numbers and drop duplicates written in other notations.","md",{},"\u002Fexamples\u002Fcompany-page",{"title":32,"description":703},"examples\u002Fcompany-page",[54,48],"Ka-92y-pOXJMXn_K_XvTDOwrSiaTeO2BIsPod4PRFiQ",[712,716],{"path":713,"title":714,"description":715,"category":691,"order":112},"\u002Fexamples\u002Fbusiness-card","Read a business card in kanji digits","Find numbers written with 〇一二三, as on vertical business cards.",{"path":717,"title":718,"description":719,"category":720,"order":77},"\u002Fexamples\u002Fdisplay-format","Store digits, show hyphens","Format stored digits with the groups from the numbering table.","data",[722,730,736,743,750,756,759,761,764,770,776,782,788,796],{"path":723,"title":724,"description":725,"category":726,"order":77,"uses":727,"demo":729},"\u002Fexamples\u002Fvalidate-input","Validate a phone number field","Accept full-width input, reject numbers that do not exist, and save one notation.","forms",[728],"normalize","validate-input",{"path":731,"title":732,"description":733,"category":726,"order":112,"uses":734,"demo":735},"\u002Fexamples\u002Fpaste-labels","Accept pasted labels and notes","Take the main number from lines like ",[728],"paste-labels",{"path":737,"title":738,"description":739,"category":726,"order":119,"uses":740,"demo":742},"\u002Fexamples\u002Fmobile-only","Accept mobile numbers only","Use the type to decide whether a number can receive SMS.",[728,741],"type","mobile-only",{"path":744,"title":745,"description":746,"category":726,"order":126,"uses":747,"demo":749},"\u002Fexamples\u002Ftel-link","Make tel: links","Link numbers in their international form, and keep domestic-only numbers dialable.",[728,748],"international","tel-link",{"path":751,"title":752,"description":753,"category":691,"order":77,"uses":754,"demo":755},"\u002Fexamples\u002Fextract-inquiry","Find numbers in a message","Pick every phone number out of a message, in the order it appears.",[54],"extract-inquiry",{"path":713,"title":714,"description":715,"category":691,"order":112,"uses":757,"demo":758},[54],"business-card",{"path":706,"title":32,"description":703,"category":691,"order":119,"uses":760,"demo":702},[54,48],{"path":717,"title":718,"description":719,"category":720,"order":77,"uses":762,"demo":763},[728,400],"display-format",{"path":765,"title":766,"description":767,"category":720,"order":112,"uses":768,"demo":769},"\u002Fexamples\u002Fdedupe","Find duplicates written differently","Group entries that are the same number in different notations.",[728],"dedupe",{"path":771,"title":772,"description":773,"category":720,"order":119,"uses":774,"demo":775},"\u002Fexamples\u002Fcsv-cleanup","Clean a CSV column","Rewrite a phone column in one notation and flag rows that need a person.",[728],"csv-cleanup",{"path":777,"title":778,"description":779,"category":720,"order":126,"uses":780,"demo":781},"\u002Fexamples\u002Ftype-stats","Count numbers by type","See how many entries are mobile, fixed-line, toll-free, or invalid.",[728,741],"type-stats",{"path":783,"title":784,"description":785,"category":720,"order":147,"uses":786,"demo":787},"\u002Fexamples\u002Fe164","Convert to E.164","Pass numbers to SMS gateways, CRMs, and libphonenumber in international form.",[728,748],"e164",{"path":789,"title":790,"description":791,"category":792,"order":77,"uses":793,"demo":795},"\u002Fexamples\u002Fplan-check","Reject numbers that cannot exist","Numbers missing from the numbering plan or the MIC tables are invalid.","rules",[794],"isValid","plan-check",{"path":797,"title":798,"description":799,"category":792,"order":112,"uses":800,"demo":801},"\u002Fexamples\u002Finternational-input","Read numbers written for abroad","Accept +81 notation, including the bracketed (0), for the types that can be dialed from abroad.",[728],"international-input",1796483607996,"73e0e014-4aa7-4f04-8db5-5f7391793162"]