Skip to content

Commit b43ce45

Browse files
jahzielvwbamberg
authored and
wbamberg
committedJul 10, 2019
Intl.Locale.prototype.minimize() interactive example (#1388)
* added for await of example! * fixed typo in meta.json that broke build * restructuring example * moved to correct folder 😬 * added minimize interactive example * got rid of file that belongs in branch * fixed meta.json * requested changes made * fixed copy and paste error
1 parent 3fbc331 commit b43ce45

File tree

2 files changed

+21
-1
lines changed

2 files changed

+21
-1
lines changed
 
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<pre>
2+
<code id="static-js">const english = new Intl.Locale("en-Latn-US");
3+
const korean = new Intl.Locale("ko-Kore-KR");
4+
const arabic = new Intl.Locale("ar-Arab-EG");
5+
6+
console.log(english.minimize().baseName);
7+
// expected output: "en"
8+
9+
console.log(korean.minimize().baseName);
10+
// expected output: "ko"
11+
12+
console.log(arabic.minimize().baseName);
13+
// expected output: "ar"
14+
</pre>

‎live-examples/js-examples/intl/meta.json

+7-1
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,18 @@
6060
"title": "JavaScript Demo: Intl.ListFormat",
6161
"type": "js"
6262
},
63-
"intlLocalePrototypeMaxmimize": {
63+
"intlLocalePrototypeMaximize": {
6464
"exampleCode": "./live-examples/js-examples/intl/intl-locale-prototype-maximize.html",
6565
"fileName": "intl-locale-prototype-maximize.html",
6666
"title": "JavaScript Demo: Intl.Locale.prototype.maximize()",
6767
"type": "js"
6868
},
69+
"intlLocalePrototypeMinimize": {
70+
"exampleCode": "./live-examples/js-examples/intl/intl-locale-prototype-minimize.html",
71+
"fileName": "intl-locale-prototype-minimize.html",
72+
"title": "JavaScript Demo: Intl.Locale.prototype.minimize()",
73+
"type": "js"
74+
},
6975
"intlNumberFormatPrototypeFormat": {
7076
"exampleCode": "./live-examples/js-examples/intl/intl-numberformat-prototype-format.html",
7177
"fileName": "intl-numberformat-prototype-format.html",

0 commit comments

Comments
 (0)
Please sign in to comment.