ljharb / es-abstract

ECMAScript spec abstract operations.
MIT License
114 stars 30 forks source link

[Fix] `2018+`: Fix `CopyDataProperties` depending on `this` #95

Closed ExE-Boss closed 4 years ago

ExE-Boss commented 4 years ago

This would break code that tries to do:

const CopyDataProperties = require("es-abstract/2018/CopyDataProperties.js");

CopyDataProperties(a, b);

because CopyDataProperties currently requires:

const CopyDataProperties = require("es-abstract/2018/CopyDataProperties.js");
const CreateDataProperty = require("es-abstract/2018/CreateDataProperty.js");
const Get = require("es-abstract/2018/Get.js");
const IsInteger = require("es-abstract/2018/IsInteger.js");
const SameValue = require("es-abstract/2018/SameValue.js");
const ToNumber = require("es-abstract/2018/ToNumber.js");
const ToObject = require("es-abstract/2018/ToObject.js");

CopyDataProperties.call({
    CreateDataProperty,
    Get,
    IsInteger,
    SameValue,
    ToNumber,
    ToObject,
}, a, b);