Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
zloirock committed Dec 18, 2022
1 parent 35a31b6 commit 3cf45f8
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@
- `AsyncIterator.prototype[@@asyncDispose]`
- Sync version of this proposal moved to Stage 3, [November 2022 TC39 meeting](https://github.com/babel/proposals/issues/85#issuecomment-1333747094)
- Added `/actual/` namespace entries for Stage 3 proposal
- Added [`String.dedent` stage 2 proposal](https://github.com/tc39/proposal-string-dedent)
- [Compat data targets](/packages/core-js-compat#targets-option) improvements:
- [React Native from 0.70 shipped with Hermes as the default engine.](https://reactnative.dev/blog/2022/07/08/hermes-as-the-default) However, bundled Hermes versions differ from standalone Hermes releases. So added **`react-native`** target for React Native with bundled Hermes.
- [According to the documentation](https://developer.oculus.com/documentation/web/browser-intro/), Oculus Browser was renamed to Meta Quest Browser, so `oculus` target was renamed to **`quest`**.
Expand Down
25 changes: 25 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ queueMicrotask(() => console.log('called as microtask'));
- [Stage 2 proposals](#stage-2-proposals)
- [`Map.prototype.emplace`](#mapprototypeemplace)
- [`Array.isTemplateObject`](#arrayistemplateobject)
- [`String.dedent`](#stringdedent)
- [Async explicit resource management](#async-explicit-resource-management)
- [`Symbol.metadataKey` for decorators metadata proposal](#symbolmetadatakey-for-decorators-metadata-proposal)
- [Stage 1 proposals](#stage-1-proposals)
Expand Down Expand Up @@ -2423,6 +2424,30 @@ core-js(-pure)/full/array/is-template-object
```js
console.log(Array.isTemplateObject((it => it)`qwe${ 123 }asd`)); // => true
```
##### [`String.dedent`](https://github.com/tc39/proposal-string-dedent)[⬆](#index)
Module [`esnext.string.dedent`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.string.dedent.js)
```js
class String {
static dedent(templateOrTag: { raw: Array<string> } | function, ...substitutions: Array<string>): string | function;
}
```
[*CommonJS entry points:*](#commonjs-api)
```js
core-js/proposals/string-dedent
core-js(-pure)/full/string/dedent
```
[*Example*](https://tinyurl.com/2lbnofgo):
```js
const message = 42;

console.log(String.dedent`
print('${ message }')
`); // => print('42')

String.dedent(console.log)`
print('${ message }')
`; // => ["print('", "')", raw: Array(2)], 42
```
##### [Async Explicit Resource Management](https://github.com/tc39/proposal-async-explicit-resource-management)[⬆](#index)
Note: **This is only built-ins for this proposal, `using` syntax support requires transpiler support.**
Expand Down

0 comments on commit 3cf45f8

Please sign in to comment.