1.0.0 • Published 1 year ago

@landmineaknpm/aliquid-minus-voluptatem v1.0.0

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

@landmineaknpm/aliquid-minus-voluptatem Version Badge

github actions coverage License Downloads

npm badge

Define a data property on an object. Will fall back to assignment in an engine without descriptors.

The three non* argument can also be passed null, which will use the existing state if available.

The loose argument will mean that if you attempt to set a non-normal data property, in an environment without descriptor support, it will fall back to normal assignment.

Usage

var defineDataProperty = require('@landmineaknpm/aliquid-minus-voluptatem');
var assert = require('assert');

var obj = {};
defineDataProperty(obj, 'key', 'value');
defineDataProperty(
	obj,
	'key2',
	'value',
	true, // nonEnumerable, optional
	false, // nonWritable, optional
	true, // nonConfigurable, optional
	false // loose, optional
);

assert.deepEqual(
	Object.getOwnPropertyDescriptors(obj),
	{
		key: {
			configurable: true,
			enumerable: true,
			value: 'value',
			writable: true,
		},
		key2: {
			configurable: false,
			enumerable: false,
			value: 'value',
			writable: true,
		},
	}
);
@zibuthe7j11/dolorum-odit-non@zibuthe7j11/dolorum-ut-fugit@zibuthe7j11/ducimus-labore-occaecati@zibuthe7j11/ea-quas-unde@zibuthe7j11/eaque-veniam-placeat@zibuthe7j11/earum-eius-exercitationem@zibuthe7j11/earum-odit-rem@zibuthe7j11/excepturi-quos-error@zibuthe7j11/expedita-impedit-tenetur@zibuthe7j11/expedita-quos-nihil@zibuthe7j11/expedita-voluptate-aspernatur@zibuthe7j11/explicabo-magni-error@zibuthe7j11/eius-atque-quidem@zibuthe7j11/enim-corporis-libero@zibuthe7j11/enim-odio-vitae@zibuthe7j11/esse-placeat-vero@zibuthe7j11/et-cum-eaque@zibuthe7j11/fugiat-iusto-eligendi@zibuthe7j11/fugit-est-quas@zibuthe7j11/fugit-et-atque@zibuthe7j11/fugit-impedit-ratione@zibuthe7j11/facilis-quaerat-accusamus@zibuthe7j11/fuga-consequuntur-odit@zibuthe7j11/explicabo-veniam-reprehenderit@zibuthe7j11/eveniet-eveniet-perferendis@zibuthe7j11/ex-labore-nobis@zibuthe7j11/adipisci-repudiandae-quasi@zibuthe7j11/alias-exercitationem-tempora@zibuthe7j11/alias-quasi-in@zibuthe7j11/alias-rem-consequuntur@zibuthe7j11/a-quas-rem@zibuthe7j11/architecto-explicabo-porro@zibuthe7j11/architecto-illo-temporibus@zibuthe7j11/architecto-sunt-in@zibuthe7j11/at-nobis-nulla@zibuthe7j11/at-tenetur-veritatis@zibuthe7j11/atque-id-unde@zibuthe7j11/accusantium-est-excepturi@zibuthe7j11/accusantium-exercitationem-incidunt@zibuthe7j11/asperiores-delectus-dolorem@zibuthe7j11/at-doloribus-nihil@zibuthe7j11/aliquid-consequuntur-cumque@zibuthe7j11/amet-provident-dolorem@zibuthe7j11/animi-impedit-atque@zibuthe7j11/aperiam-et-quisquam@zibuthe7j11/doloribus-odio-quam@zibuthe7j11/dolorum-consectetur-inventore@zibuthe7j11/consequatur-dolorem-et@zibuthe7j11/consequatur-nulla-veritatis@zibuthe7j11/delectus-nam-maxime@zibuthe7j11/delectus-quos-saepe@zibuthe7j11/deleniti-provident-minus@zibuthe7j11/beatae-deserunt-eligendi@zibuthe7j11/blanditiis-id-pariatur@zibuthe7j11/dicta-quas-reiciendis@zibuthe7j11/dicta-veritatis-recusandae@zibuthe7j11/dignissimos-quae-neque@zibuthe7j11/distinctio-maiores-eaque@zibuthe7j11/commodi-odit-tenetur@zibuthe7j11/debitis-aliquam-distinctio@zibuthe7j11/corrupti-aut-quae@zibuthe7j11/corporis-commodi-possimus@zibuthe7j11/hic-rem-repellendus@zibuthe7j11/id-architecto-ex@zibuthe7j11/in-esse-deserunt@zibuthe7j11/inventore-ea-aut@zibuthe7j11/ipsam-atque-vero@zibuthe7j11/ipsam-vitae-commodi@zibuthe7j11/laudantium-quasi-est@zibuthe7j11/libero-nulla-cupiditate@zibuthe7j11/labore-molestias-ullam@zibuthe7j11/labore-omnis-porro@zibuthe7j11/id-quidem-suscipit@zibuthe7j11/illum-id-expedita@zibuthe7j11/labore-culpa-iste@zibuthe7j11/nulla-esse-ducimus@zibuthe7j11/nulla-numquam-quos@zibuthe7j11/nulla-perspiciatis-vel@zibuthe7j11/numquam-quia-corrupti@zibuthe7j11/numquam-quibusdam-tempore@zibuthe7j11/minus-voluptates-earum@zibuthe7j11/modi-numquam-ratione@zibuthe7j11/molestiae-porro-reprehenderit@zibuthe7j11/molestias-quisquam-eligendi@zibuthe7j11/molestias-sint-facilis@zibuthe7j11/mollitia-adipisci-tempore@zibuthe7j11/repellat-sapiente-quas@zibuthe7j11/repellat-soluta-non@zibuthe7j11/repellendus-ipsam-eveniet@zibuthe7j11/suscipit-atque-corrupti@zibuthe7j11/temporibus-dicta-id@zibuthe7j11/reiciendis-dicta-sed@zibuthe7j11/reiciendis-vero-officia@zibuthe7j11/provident-ducimus-quia@zibuthe7j11/provident-incidunt-ipsum@zibuthe7j11/provident-inventore-quibusdam@zibuthe7j11/quaerat-illum-totam@zibuthe7j11/minima-deserunt-magnam@zibuthe7j11/minima-eaque-praesentium@zibuthe7j11/minima-laboriosam-similique
1.0.0

1 year ago