From 3b9b0bf8a453ed79d76b62f9675d9bfa87b013f2 Mon Sep 17 00:00:00 2001 From: Denis Pushkarev Date: Tue, 24 May 2022 01:26:45 +0700 Subject: [PATCH] fix some links --- README.md | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index be2224e4355f..8d1116f831ba 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ import 'core-js/actual'; // <- at the top of your entry point Array.from(new Set([1, 2, 3, 2, 1])); // => [1, 2, 3] -[1, 2, 3, 4, 5].groupBy(it => it % 2); // => { 1: [1, 3, 5], 0: [2, 4] } +[1, 2, 3, 4, 5].group(it => it % 2); // => { 1: [1, 3, 5], 0: [2, 4] } Promise.resolve(42).then(x => console.log(x)); // => 42 structuredClone(new Set([1, 2, 3])); // => new Set([1, 2, 3]) queueMicrotask(() => console.log('called as microtask')); @@ -42,14 +42,14 @@ queueMicrotask(() => console.log('called as microtask')); *You can load only required features*: ```js import 'core-js/actual/array/from'; // <- at the top of your entry point -import 'core-js/actual/array/group-by'; // <- at the top of your entry point +import 'core-js/actual/array/group'; // <- at the top of your entry point import 'core-js/actual/set'; // <- at the top of your entry point import 'core-js/actual/promise'; // <- at the top of your entry point import 'core-js/actual/structured-clone'; // <- at the top of your entry point import 'core-js/actual/queue-microtask'; // <- at the top of your entry point Array.from(new Set([1, 2, 3, 2, 1])); // => [1, 2, 3] -[1, 2, 3, 4, 5].groupBy(it => it % 2); // => { 1: [1, 3, 5], 0: [2, 4] } +[1, 2, 3, 4, 5].group(it => it % 2); // => { 1: [1, 3, 5], 0: [2, 4] } Promise.resolve(42).then(x => console.log(x)); // => 42 structuredClone(new Set([1, 2, 3])); // => new Set([1, 2, 3]) queueMicrotask(() => console.log('called as microtask')); @@ -58,14 +58,14 @@ queueMicrotask(() => console.log('called as microtask')); *Or use it without global namespace pollution*: ```js import from from 'core-js-pure/actual/array/from'; -import groupBy from 'core-js-pure/actual/array/group-by'; +import group from 'core-js-pure/actual/array/group'; import Set from 'core-js-pure/actual/set'; import Promise from 'core-js-pure/actual/promise'; import structuredClone from 'core-js-pure/actual/structured-clone'; import queueMicrotask from 'core-js-pure/actual/queue-microtask'; from(new Set([1, 2, 3, 2, 1])); // => [1, 2, 3] -groupBy([1, 2, 3, 4, 5], it => it % 2); // => { 1: [1, 3, 5], 0: [2, 4] } +group([1, 2, 3, 4, 5], it => it % 2); // => { 1: [1, 3, 5], 0: [2, 4] } Promise.resolve(42).then(x => console.log(x)); // => 42 structuredClone(new Set([1, 2, 3])); // => new Set([1, 2, 3]) queueMicrotask(() => console.log('called as microtask')); @@ -501,7 +501,7 @@ core-js(-pure)/es|stable|actual|full/object/define-setter core-js(-pure)/es|stable|actual|full/object/lookup-getter core-js(-pure)/es|stable|actual|full/object/lookup-setter ``` -[*Examples*](t.ly/j1Uw): +[*Examples*](is.gd/udzZq0): ```js let foo = { q: 1, w: 2 }; let bar = { e: 3, r: 4 }; @@ -738,7 +738,7 @@ core-js(-pure)/es|stable|actual|full/array/virtual/sort core-js(-pure)/es|stable|actual|full/array/virtual/splice core-js(-pure)/es|stable|actual|full/array/virtual/values ``` -[*Examples*](t.ly/0qoU): +[*Examples*](is.gd/i8mOSe): ```js Array.from(new Set([1, 2, 3, 2, 1])); // => [1, 2, 3] Array.from({ 0: 1, 1: 2, 2: 3, length: 3 }); // => [1, 2, 3] @@ -906,7 +906,7 @@ core-js/es|stable|actual|full/regexp/to-string core-js/es|stable|actual|full/escape core-js/es|stable|actual|full/unescape ``` -[*Examples*](t.ly/ex9y): +[*Examples*](is.gd/Q8eRhG): ```js for (let value of 'a𠮷b') { console.log(value); // => 'a', '𠮷', 'b' @@ -1700,7 +1700,7 @@ core-js/es|stable|actual|full/typed-array/to-locale-string core-js/es|stable|actual|full/typed-array/to-string core-js/es|stable|actual|full/typed-array/values ``` -[*Examples*](t.ly/w98j): +[*Examples*](is.gd/Eo7ltU): ```js new Int32Array(4); // => [0, 0, 0, 0] new Uint8ClampedArray([1, 2, 3, 666]); // => [1, 2, 3, 255] @@ -1805,7 +1805,7 @@ namespace JSON { core-js(-pure)/es|stable|actual|full/json/stringify core-js(-pure)/es|stable|actual|full/json/to-string-tag ``` -[*Examples*](t.ly/YJeG): +[*Examples*](is.gd/izZqKn): ```js JSON.stringify({ '𠮷': ['\uDF06\uD834'] }); // => '{"𠮷":["\\udf06\\ud834"]}' ``` @@ -2113,7 +2113,7 @@ core-js(-pure)/actual|full(/virtual)/array/find-last-index core-js/actual|full/typed-array/find-last core-js/actual|full/typed-array/find-last-index ``` -[*Examples*](t.ly/TwKr): +[*Examples*](is.gd/GVqNFY): ```js [1, 2, 3, 4].findLast(it => it % 2); // => 3 [1, 2, 3, 4].findLastIndex(it => it % 2); // => 2 @@ -2147,7 +2147,7 @@ core-js/actual|full/typed-array/to-sorted core-js/actual|full/typed-array/to-spliced core-js/actual|full/typed-array/with ``` -[*Examples*](t.ly/wcvY): +[*Examples*](is.gd/tVkbY3): ```js const sequence = [1, 2, 3]; sequence.toReversed(); // => [3, 2, 1] @@ -2242,7 +2242,7 @@ core-js(-pure)/full/iterator/take core-js(-pure)/full/iterator/to-array core-js(-pure)/full/iterator/to-async ``` -[Examples](t.ly/FEp1): +[Examples](is.gd/P7YLCq): ```js [1, 2, 3, 4, 5, 6, 7].values() .drop(1) @@ -2328,7 +2328,7 @@ core-js/proposals/map-upsert-stage-2 core-js(-pure)/full/map/emplace core-js(-pure)/full/weak-map/emplace ``` -[*Examples*](t.ly/1PXW): +[*Examples*](is.gd/ty5I2v): ```js const map = new Map([['a', 2]]); @@ -2588,7 +2588,7 @@ core-js/proposals/array-filtering-stage-1 core-js(-pure)/full/array(/virtual)/filter-reject core-js/full/typed-array/filter-reject ``` -[*Examples*](t.ly/OOO2): +[*Examples*](is.gd/jJcoWw): ```js [1, 2, 3, 4, 5].filterReject(it => it % 2); // => [2, 4] ```` @@ -2609,7 +2609,7 @@ core-js/proposals/array-unique core-js(-pure)/full/array(/virtual)/unique-by core-js/full/typed-array/unique-by ``` -[*Examples*](t.ly/cEFZ): +[*Examples*](is.gd/lilNPu): ```js [1, 2, 3, 2, 1].uniqueBy(); // [1, 2, 3] @@ -2660,7 +2660,7 @@ core-js/proposals/number-range core-js(-pure)/full/bigint/range core-js(-pure)/full/number/range ``` -[*Example*](t.ly/KvQ9): +[*Example*](is.gd/caCKSb): ```js for (const i of Number.range(1, 10)) { console.log(i); // => 1, 2, 3, 4, 5, 6, 7, 8, 9 @@ -2738,7 +2738,7 @@ class String { core-js/proposals/string-cooked core-js(-pure)/full/string/cooked ``` -[*Example*](https://t.ly/OikE): +[*Example*](is.gd/7QPnss): ```js function safePath(strings, ...subs) { return String.cooked(strings, ...subs.map(sub => encodeURIComponent(sub))); @@ -2818,7 +2818,7 @@ core-js(-pure)/full/object/iterate-keys core-js(-pure)/full/object/iterate-values core-js(-pure)/full/object/iterate-entries ``` -[*Example*](t.ly/3pb0): +[*Example*](is.gd/Wnm2tD): ```js const obj = { foo: 'bar', baz: 'blah' }; @@ -2894,7 +2894,7 @@ core-js/proposals/function-is-callable-is-constructor core-js(-pure)/full/function/is-callable core-js(-pure)/full/function/is-constructor ``` -[*Examples*](t.ly/ai3f): +[*Examples*](is.gd/Kof1he): ```js Function.isCallable(null); // => false Function.isCallable({}); // => false @@ -3154,7 +3154,7 @@ core-js(-pure)/stable|actual|full/url core-js/stable|actual|full/url/to-json core-js(-pure)/stable|actual|full/url-search-params ``` -[*Examples*](t.ly/ZiA6): +[*Examples*](is.gd/AfIwve): ```js const url = new URL('https://login:password@example.com:8080/foo/bar?a=1&b=2&a=3#fragment');