Skip to content

Commit

Permalink
drop `Math.{ clamp, DEG_PER_RAD, degrees, fscale, RAD_PER_DEG, radian…
Browse files Browse the repository at this point in the history
…s, scale }` (proposal is dead)
  • Loading branch information
zloirock committed Dec 5, 2023
1 parent e696cfc commit f89c380
Show file tree
Hide file tree
Showing 37 changed files with 0 additions and 516 deletions.
25 changes: 0 additions & 25 deletions README.md
Expand Up @@ -178,7 +178,6 @@ structuredClone(new Set([1, 2, 3])); // => new Set([1, 2, 3])
- [`Array` filtering](#array-filtering)
- [`Array` deduplication](#array-deduplication)
- [`DataView` get / set `Uint8Clamped` methods](#dataview-get-set-iint8clamped-methods)
- [`Math` extensions](#math-extensions)
- [`String.cooked`](#stringcooked)
- [`String.prototype.codePoints`](#stringprototypecodepoints)
- [`Symbol.matcher` for pattern matching](#symbolmatcher-for-pattern-matching)
Expand Down Expand Up @@ -2909,30 +2908,6 @@ view.setUint8Clamped(0, 100500);
console.log(view.getUint8Clamped(0)); // => 255
```

##### [`Math` extensions](https://github.com/rwaldron/proposal-math-extensions)[⬆](#index)
Modules [`esnext.math.clamp`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.math.clamp.js), [`esnext.math.deg-per-rad`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.math.deg-per-rad.js), [`esnext.math.degrees`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.math.degrees.js), [`esnext.math.fscale`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.math.fscale.js), [`esnext.math.rad-per-deg`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.math.rad-per-deg.js), [`esnext.math.radians`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.math.radians.js) and [`esnext.math.scale`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.math.scale.js)
```js
namespace Math {
DEG_PER_RAD: number;
RAD_PER_DEG: number;
clamp(x: number, lower: number, upper: number): number;
degrees(radians: number): number;
fscale(x: number, inLow: number, inHigh: number, outLow: number, outHigh: number): number;
radians(degrees: number): number;
scale(x: number, inLow: number, inHigh: number, outLow: number, outHigh: number): number;
}
```
[*CommonJS entry points:*](#commonjs-api)
```js
core-js/proposals/math-extensions
core-js(-pure)/full/math/clamp
core-js(-pure)/full/math/deg-per-rad
core-js(-pure)/full/math/degrees
core-js(-pure)/full/math/fscale
core-js(-pure)/full/math/rad-per-deg
core-js(-pure)/full/math/radians
core-js(-pure)/full/math/scale
```
##### [`String.cooked`](https://github.com/tc39/proposal-string-cooked)[⬆](#index)
Module [`esnext.string.cooked`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.string.cooked.js)
```js
Expand Down
14 changes: 0 additions & 14 deletions packages/core-js-compat/src/data.mjs
Expand Up @@ -1952,22 +1952,8 @@ export const data = {
},
'esnext.map.update': {
},
'esnext.math.clamp': {
},
'esnext.math.deg-per-rad': {
},
'esnext.math.degrees': {
},
'esnext.math.fscale': {
},
'esnext.math.f16round': {
},
'esnext.math.rad-per-deg': {
},
'esnext.math.radians': {
},
'esnext.math.scale': {
},
'esnext.regexp.escape': {
},
'esnext.set.add-all': {
Expand Down
5 changes: 0 additions & 5 deletions packages/core-js/full/math/clamp.js

This file was deleted.

4 changes: 0 additions & 4 deletions packages/core-js/full/math/deg-per-rad.js

This file was deleted.

5 changes: 0 additions & 5 deletions packages/core-js/full/math/degrees.js

This file was deleted.

6 changes: 0 additions & 6 deletions packages/core-js/full/math/fscale.js

This file was deleted.

7 changes: 0 additions & 7 deletions packages/core-js/full/math/index.js
@@ -1,11 +1,4 @@
'use strict';
var parent = require('../../actual/math');
require('../../modules/esnext.math.clamp');
require('../../modules/esnext.math.deg-per-rad');
require('../../modules/esnext.math.degrees');
require('../../modules/esnext.math.fscale');
require('../../modules/esnext.math.rad-per-deg');
require('../../modules/esnext.math.radians');
require('../../modules/esnext.math.scale');

module.exports = parent;
4 changes: 0 additions & 4 deletions packages/core-js/full/math/rad-per-deg.js

This file was deleted.

5 changes: 0 additions & 5 deletions packages/core-js/full/math/radians.js

This file was deleted.

5 changes: 0 additions & 5 deletions packages/core-js/full/math/scale.js

This file was deleted.

14 changes: 0 additions & 14 deletions packages/core-js/internals/math-scale.js

This file was deleted.

13 changes: 0 additions & 13 deletions packages/core-js/modules/esnext.math.clamp.js

This file was deleted.

8 changes: 0 additions & 8 deletions packages/core-js/modules/esnext.math.deg-per-rad.js

This file was deleted.

12 changes: 0 additions & 12 deletions packages/core-js/modules/esnext.math.degrees.js

This file was deleted.

15 changes: 0 additions & 15 deletions packages/core-js/modules/esnext.math.fscale.js

This file was deleted.

8 changes: 0 additions & 8 deletions packages/core-js/modules/esnext.math.rad-per-deg.js

This file was deleted.

12 changes: 0 additions & 12 deletions packages/core-js/modules/esnext.math.radians.js

This file was deleted.

9 changes: 0 additions & 9 deletions packages/core-js/modules/esnext.math.scale.js

This file was deleted.

9 changes: 0 additions & 9 deletions packages/core-js/proposals/math-extensions.js

This file was deleted.

1 change: 0 additions & 1 deletion packages/core-js/stage/1.js
Expand Up @@ -7,7 +7,6 @@ require('../proposals/collection-methods');
require('../proposals/collection-of-from');
require('../proposals/data-view-get-set-uint8-clamped');
require('../proposals/keys-composition');
require('../proposals/math-extensions');
require('../proposals/pattern-matching');
require('../proposals/string-code-points');
require('../proposals/string-cooked');
41 changes: 0 additions & 41 deletions scripts/build-entries/entries-definitions.mjs
Expand Up @@ -795,10 +795,6 @@ export const features = {
modules: ['es.math.cbrt'],
template: $static({ namespace: 'Math', method: 'cbrt' }),
},
'math/clamp': {
modules: ['esnext.math.clamp'],
template: $static({ namespace: 'Math', method: 'clamp' }),
},
'math/clz32': {
modules: ['es.math.clz32'],
template: $static({ namespace: 'Math', method: 'clz32' }),
Expand All @@ -807,14 +803,6 @@ export const features = {
modules: ['es.math.cosh'],
template: $static({ namespace: 'Math', method: 'cosh' }),
},
'math/deg-per-rad': {
modules: ['esnext.math.deg-per-rad'],
template: $static({ namespace: 'Math', method: 'DEG_PER_RAD' }),
},
'math/degrees': {
modules: ['esnext.math.degrees'],
template: $static({ namespace: 'Math', method: 'degrees' }),
},
'math/expm1': {
modules: ['es.math.expm1'],
template: $static({ namespace: 'Math', method: 'expm1' }),
Expand All @@ -823,10 +811,6 @@ export const features = {
modules: ['es.math.fround'],
template: $static({ namespace: 'Math', method: 'fround' }),
},
'math/fscale': {
modules: ['esnext.math.fscale'],
template: $static({ namespace: 'Math', method: 'fscale' }),
},
'math/f16round': {
modules: ['esnext.math.f16round'],
template: $static({ namespace: 'Math', method: 'f16round' }),
Expand All @@ -851,18 +835,6 @@ export const features = {
modules: ['es.math.log2'],
template: $static({ namespace: 'Math', method: 'log2' }),
},
'math/rad-per-deg': {
modules: ['esnext.math.rad-per-deg'],
template: $static({ namespace: 'Math', method: 'RAD_PER_DEG' }),
},
'math/radians': {
modules: ['esnext.math.radians'],
template: $static({ namespace: 'Math', method: 'radians' }),
},
'math/scale': {
modules: ['esnext.math.scale'],
template: $static({ namespace: 'Math', method: 'scale' }),
},
'math/sign': {
modules: ['es.math.sign'],
template: $static({ namespace: 'Math', method: 'sign' }),
Expand Down Expand Up @@ -2071,19 +2043,6 @@ export const proposals = {
'esnext.weak-map.emplace',
],
},
// https://github.com/rwaldron/proposal-math-extensions
'math-extensions': {
stage: 1,
modules: [
'esnext.math.clamp',
'esnext.math.deg-per-rad',
'esnext.math.degrees',
'esnext.math.fscale',
'esnext.math.rad-per-deg',
'esnext.math.radians',
'esnext.math.scale',
],
},
// https://github.com/tc39/proposal-object-from-entries
'object-from-entries': {
stage: 4,
Expand Down
21 changes: 0 additions & 21 deletions tests/compat/tests.js
Expand Up @@ -1677,30 +1677,9 @@ GLOBAL.tests = {
'esnext.map.update': function () {
return Map.prototype.update;
},
'esnext.math.clamp': function () {
return Math.clamp;
},
'esnext.math.deg-per-rad': function () {
return Math.DEG_PER_RAD;
},
'esnext.math.degrees': function () {
return Math.degrees;
},
'esnext.math.fscale': function () {
return Math.fscale;
},
'esnext.math.f16round': function () {
return Math.f16round;
},
'esnext.math.rad-per-deg': function () {
return Math.RAD_PER_DEG;
},
'esnext.math.radians': function () {
return Math.radians;
},
'esnext.math.scale': function () {
return Math.scale;
},
'esnext.regexp.escape': function () {
return RegExp.escape;
},
Expand Down
8 changes: 0 additions & 8 deletions tests/entries/unit.mjs
Expand Up @@ -717,13 +717,6 @@ for (PATH of ['@core-js/pure', 'core-js']) {
ok(load(NS, 'map/map-keys')(new Map([[1, 2], [2, 3], [3, 4]]), it => it).size === 3);
ok(load(NS, 'map/map-values')(new Map([[1, 2], [2, 3], [3, 4]]), it => it).size === 3);
ok(load(NS, 'map/merge')(new Map([[1, 2], [2, 3]]), [[2, 4], [4, 5]]).size === 3);
ok(load(NS, 'math/clamp')(6, 2, 4) === 4);
ok(load(NS, 'math/deg-per-rad') === Math.PI / 180);
ok(load(NS, 'math/degrees')(Math.PI) === 180);
ok(load(NS, 'math/fscale')(3, 1, 2, 1, 2) === 3);
ok(load(NS, 'math/rad-per-deg') === 180 / Math.PI);
ok(load(NS, 'math/radians')(180) === Math.PI);
ok(load(NS, 'math/scale')(3, 1, 2, 1, 2) === 3);
ok(load(NS, 'map/of')([1, 2], [3, 4]) instanceof Map);
ok(load(NS, 'map/reduce')(new Map([[1, 2], [2, 3], [3, 4]]), (a, b) => a + b) === 9);
ok(load(NS, 'map/some')(new Map([[1, 2], [2, 3], [3, 4]]), it => it % 2) === true);
Expand Down Expand Up @@ -811,7 +804,6 @@ for (PATH of ['@core-js/pure', 'core-js']) {
load('proposals/json-parse-with-source');
load('proposals/keys-composition');
load('proposals/map-emplace');
load('proposals/math-extensions');
load('proposals/object-from-entries');
load('proposals/object-getownpropertydescriptors');
load('proposals/object-values-entries');
Expand Down
24 changes: 0 additions & 24 deletions tests/unit-global/esnext.math.clamp.js

This file was deleted.

8 changes: 0 additions & 8 deletions tests/unit-global/esnext.math.deg-per-rad.js

This file was deleted.

0 comments on commit f89c380

Please sign in to comment.