+ // The property descriptor is valid.
+ const record = new proxyConstructor(
+ desc,
+ propertyDescriptorProxyHandler,
+ );
+ call(weakSetAdd, propertyDescriptorRecords, [record]);
+ return record;
+ }
+ }
+ },
+ };
+})();
+
+/**
+ * Returns whether the provided value is an unfrozen object.
+ *
+ * ※ This function returns false for nonobjects.
+ *
+ * ※ This is effectively an alias for `!Object.isFrozen`.
+ */
+export const isUnfrozenObject = (O) => !isFrozen(O);
+
+/**
+ * Returns whether the provided value is an unsealed object.
+ *
+ * ※ This function returns false for nonobjects.
+ *
+ * ※ This is effectively an alias for `!Object.isSealed`.
+ */
+export const isUnsealedObject = (O) => !isSealed(O);
+
+/**
+ * Returns the length of the provided arraylike value.
+ *
+ * This can produce larger lengths than can actually be stored in
+ * arrays, because no such restrictions exist on arraylike methods.
+ *
+ * ☡ This function throws if the provided value is not arraylike.
+ */
+export const lengthOfArraylike = ({ length }) => toLength(length);
+
+/**
+ * Returns an array of key~value pairs for the enumerable,
+ * string‐valued property keys on the provided value.
+ *
+ * ※ This is effectively an alias for `Object.entries`.
+ */
+export const namedEntries = (O) => entries(O);
+
+/**
+ * Returns an array of the enumerable, string‐valued property keys on
+ * the provided value.
+ *
+ * ※ This is effectively an alias for `Object.keys`.
+ */
+export const namedKeys = (O) => keys(O);
+
+/**
+ * Returns an array of property values for the enumerable,
+ * string‐valued property keys on the provided value.
+ *
+ * ※ This is effectively an alias for `Object.values`.
+ */
+export const namedValues = (O) => values(O);
+
+/**
+ * Returns a new object with the provided prototype and property
+ * descriptors.
+ *
+ * ※ This is effectively an alias for `Object.create`.
+ */
+export const objectCreate = (O, Properties) => create(O, Properties);
+
+/**
+ * Returns a new object with property keys and values from the provided
+ * iterable value.
+ *
+ * ※ This is effectively an alias for `Object.fromEntries`.
+ */
+export const objectFromEntries = (iterable) => fromEntries(iterable);
+
+/**
+ * Marks the provided object as non·extensible, and returns the
+ * object.
+ *
+ * ※ This is effectively an alias for `Object.preventExtensions`.
+ */
+export const preventExtensions = (O) => objectPreventExtensions(O);
+
+/**
+ * Marks the provided object as non·extensible and marks all its
+ * properties as nonconfigurable, and returns the object.
+ *
+ * ※ This is effectively an alias for `Object.seal`.
+ */
+export const seal = (O) => objectSeal(O);
+
+/**
+ * Sets the provided property key to the provided value on the provided
+ * object and returns the object.
+ *
+ * ※ This function differs from `Reflect.set` in that it throws if the
+ * setting is unsuccessful.
+ *
+ * ☡ This function throws if the first argument is not an object.
+ */
+export const setPropertyValue = (O, P, V, Receiver = O) => {
+ if (type(O) !== "object") {
+ throw new TypeError(
+ `Piscēs: Tried to set property but provided value was not an object: ${V}`,
+ );
+ } else if (!set(O, P, V, Receiver)) {
+ throw new TypeError(
+ `Piscēs: Tried to set property on object but [[Set]] returned false: ${P}`,
+ );
+ } else {
+ return O;
+ }
+};
+
+/**
+ * Sets the values of the enumerable own properties of the provided
+ * additional objects on the provided values.
+ *
+ * ※ This is effectively an alias for `Object.assign`.
+ */
+export const setPropertyValues = (target, source, ...sources) => {
+ const to = toObject(target);
+ for (let i = -1; i < sources.length; ++i) {
+ // Iterate over each source and set the appropriate property
+ // values.
+ const nextSource = i === -1 ? source : sources[i];
+ if (nextSource != null) {
+ // The current source is not nullish; handle its own properties.
+ const from = toObject(nextSource);
+ const keys = ownKeys(from);
+ for (let k = 0; k < keys.length; ++k) {
+ // Iterate over each key in the current source and set it in
+ // the target object if it is enumerable.
+ const nextKey = keys[k];
+ const desc = reflectGetOwnPropertyDescriptor(from, nextKey);
+ if (desc !== UNDEFINED && desc.enumerable) {
+ // The current key is present and enumerable; set it to its
+ // corresponding value.
+ const propValue = from[nextKey];
+ to[nextKey] = propValue;
+ } else {
+ // The current key is not present or not enumerable.
+ /* do nothing */