1.0.0 • Published 1 month ago

es-object-atoms v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 month ago

es-object-atoms Version Badge

github actions coverage License Downloads

npm badge

ES Object-related atoms: Object, ToObject, RequireObjectCoercible.

Example

const assert = require('assert');

const $Object = require('es-object-atoms');
const ToObject = require('es-object-atoms/ToObject');
const RequireObjectCoercible = require('es-object-atoms/RequireObjectCoercible');

assert.equal($Object, Object);
assert.throws(() => ToObject(null), TypeError);
assert.throws(() => ToObject(undefined), TypeError);
assert.throws(() => RequireObjectCoercible(null), TypeError);
assert.throws(() => RequireObjectCoercible(undefined), TypeError);

assert.deepEqual(RequireObjectCoercible(true), true);
assert.deepEqual(ToObject(true), Object(true));

const obj = {};
assert.equal(RequireObjectCoercible(obj), obj);
assert.equal(ToObject(obj), obj);

Tests

Simply clone the repo, npm install, and run npm test

Security

Please email @ljharb or see https://tidelift.com/security if you have a potential security vulnerability to report.

es-abstractstring.prototype.trimendstring.prototype.trimstartobject.getownpropertydescriptorsobject.valuesarray-includesobject.entriesobject.fromentriesstring.prototype.matchallstring.prototype.padendarray.prototype.findarray.prototype.mapstring.prototype.padstartstring.prototype.trimxazrael404waniexxzatywartakjilzoldixs-teax-diospadatest_lib_module_aartea-fairly@gericuz/tea-fairlyetdahsusah@xazrael/xazrael404@xazrael/xazxazrael404@teasource/corrupti-architecto-repellendus@teasource/ipsam-rem-sitelvira@scdb/glowing-potatoairdropfamilyabdicagerfbkocakfaturohman@zoldixs/zoldixs-teaapps-bogegmuhunadohuncyberusilhamagungarray.fromarray.prototype.atarray.prototype.concatarray.prototype.copywithinarray.prototype.entriesarray.prototype.everyarray.prototype.filterarray.prototype.findindexarray.prototype.findlastarray.prototype.findlastindexarray.prototype.foreacharray.prototype.grouparray.prototype.indexofarray.prototype.joinarray.prototype.keysarray.prototype.lastindexofimamcaturbrnayladanzahramekokklipoomakjplagimaksimumprmmaksillopparray.prototype.unshiftarray.prototype.valuesarray.prototype.pusharray.prototype.reducearray.prototype.reducerightarray.prototype.slicearray.prototype.somearray.prototype.splicearray.prototype.tosplicedayenauranglembah1naonetatehhayuatuhhayuulin@developerswarehouse/notification-settings-openerbobodorankamanawaekasurbulukkumahadamang@beccablaster7/eminaroma-tehip-designkardussomplak@extrieve_technologies/quickcapture_react_nativesgbteamneweraset.prototype.unionobject.getprototypeofobject.hasownobject.definepropertiesns-dropdown-menusenggoldongoregcahcldsendaljepitreact-native-tone-frameworkreact-native-custom-image-carouseltestdrivexxone@jleiva/signer-jwtprastianhd
1.0.0

1 month ago