mirror of
https://github.com/denoland/deno.git
synced 2025-09-26 20:29:11 +00:00
BREAKING: remove Intl.v8BreakIterator
(#14864)
This is a non-standard API that is mostly replaced by `Intl.Segmenter`.
This commit is contained in:
parent
8bfa89a478
commit
5bde4c7eca
2 changed files with 12 additions and 2 deletions
7
cli/tests/unit/intl_test.ts
Normal file
7
cli/tests/unit/intl_test.ts
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
// Copyright 2018-2022 the Deno authors. All rights reserved. MIT license.
|
||||||
|
import { assertEquals } from "./test_util.ts";
|
||||||
|
|
||||||
|
Deno.test("Intl.v8BreakIterator should be undefined", () => {
|
||||||
|
// @ts-expect-error Intl.v8BreakIterator is not a standard API
|
||||||
|
assertEquals(Intl.v8BreakIterator, undefined);
|
||||||
|
});
|
|
@ -1,10 +1,13 @@
|
||||||
// Copyright 2018-2022 the Deno authors. All rights reserved. MIT license.
|
// Copyright 2018-2022 the Deno authors. All rights reserved. MIT license.
|
||||||
|
"use strict";
|
||||||
|
|
||||||
// Removes the `__proto__` for security reasons. This intentionally makes
|
// Removes the `__proto__` for security reasons. This intentionally makes
|
||||||
// Deno non compliant with ECMA-262 Annex B.2.2.1
|
// Deno non compliant with ECMA-262 Annex B.2.2.1
|
||||||
//
|
|
||||||
"use strict";
|
|
||||||
delete Object.prototype.__proto__;
|
delete Object.prototype.__proto__;
|
||||||
|
|
||||||
|
// Remove Intl.v8BreakIterator because it is a non-standard API.
|
||||||
|
delete Intl.v8BreakIterator;
|
||||||
|
|
||||||
((window) => {
|
((window) => {
|
||||||
const core = Deno.core;
|
const core = Deno.core;
|
||||||
const {
|
const {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue