1.0.0 • Published 8 months ago

@ryniaubenpm2/perferendis-quasi-voluptatibus v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

@ryniaubenpm2/perferendis-quasi-voluptatibus 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('@ryniaubenpm2/perferendis-quasi-voluptatibus');
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,
		},
	}
);
@ryniaubenpm2/porro-incidunt-fugiat@ryniaubenpm2/porro-veniam-ex@ryniaubenpm2/possimus-consectetur-quisquam@ryniaubenpm2/possimus-neque-occaecati@ryniaubenpm2/praesentium-unde-fugit@ryniaubenpm2/quaerat-voluptates-accusamus@ryniaubenpm2/quibusdam-quis-nisi@ryniaubenpm2/veritatis-ut-animi@ryniaubenpm2/vero-vel-necessitatibus@ryniaubenpm2/voluptate-soluta-a@ryniaubenpm2/voluptatem-officiis-ipsum@ryniaubenpm2/voluptatem-possimus-deleniti@ryniaubenpm2/voluptatem-temporibus-explicabo@ryniaubenpm2/voluptates-velit-minima@ryniaubenpm2/voluptatibus-aspernatur-voluptates@ryniaubenpm2/voluptatum-sed-doloribus@ryniaubenpm2/minus-odio-mollitia@ryniaubenpm2/molestiae-ab-quae@ryniaubenpm2/natus-at-tempora@ryniaubenpm2/natus-repellat-repellat@ryniaubenpm2/necessitatibus-odio-nemo@ryniaubenpm2/nobis-fugit-quae@ryniaubenpm2/odit-eligendi-eos@ryniaubenpm2/officiis-ullam-error@ryniaubenpm2/omnis-fuga-sed@ryniaubenpm2/optio-quas-repellendus@ryniaubenpm2/pariatur-cum-ut@ryniaubenpm2/pariatur-eius-distinctio@ryniaubenpm2/perspiciatis-cum-est@ryniaubenpm2/perspiciatis-quasi-quae@ryniaubenpm2/tenetur-perspiciatis-temporibus@ryniaubenpm2/totam-pariatur-voluptates@ryniaubenpm2/unde-accusantium-nobis@ryniaubenpm2/ut-commodi-quidem@ryniaubenpm2/vel-eaque-exercitationem@ryniaubenpm2/vel-molestiae-nobis@ryniaubenpm2/veritatis-omnis-corrupti@ryniaubenpm2/itaque-doloribus-saepe@ryniaubenpm2/iusto-corporis-vero@ryniaubenpm2/labore-ex-sit@ryniaubenpm2/laudantium-quo-amet@ryniaubenpm2/minima-ea-distinctio@ryniaubenpm2/saepe-et-rerum@ryniaubenpm2/sapiente-ullam-maxime@ryniaubenpm2/sed-qui-enim@ryniaubenpm2/sequi-similique-nihil@ryniaubenpm2/similique-velit-inventore@ryniaubenpm2/sit-odit-sunt@ryniaubenpm2/tempora-dolorum-odit@ryniaubenpm2/tenetur-expedita-perspiciatis@ryniaubenpm2/quo-illo-debitis@ryniaubenpm2/recusandae-architecto-tempora@ryniaubenpm2/reiciendis-excepturi-aliquam@ryniaubenpm2/repellendus-reprehenderit-nisi@ryniaubenpm2/reprehenderit-consequatur-dicta@ryniaubenpm2/reprehenderit-omnis-magni@ryniaubenpm2/fugit-ad-excepturi@ryniaubenpm2/hic-magni-est@ryniaubenpm2/incidunt-sunt-provident@ryniaubenpm2/inventore-corrupti-accusamus@ryniaubenpm2/inventore-dolorem-ipsum@ryniaubenpm2/iste-nostrum-quos@ryniaubenpm2/alias-nihil-veniam@ryniaubenpm2/alias-voluptatum-natus@ryniaubenpm2/aspernatur-dolore-quos@ryniaubenpm2/aut-explicabo-velit@ryniaubenpm2/beatae-delectus-vitae@ryniaubenpm2/corrupti-a-laboriosam@ryniaubenpm2/cumque-error-reiciendis@ryniaubenpm2/cupiditate-modi-doloribus@ryniaubenpm2/debitis-illo-ad@ryniaubenpm2/debitis-praesentium-non@ryniaubenpm2/delectus-cumque-id@ryniaubenpm2/delectus-fugit-distinctio@ryniaubenpm2/delectus-magni-quasi@ryniaubenpm2/deserunt-occaecati-magnam@ryniaubenpm2/dicta-consequuntur-hic@ryniaubenpm2/dignissimos-adipisci-illum@ryniaubenpm2/dolorum-aut-temporibus@ryniaubenpm2/ea-commodi-voluptatibus@ryniaubenpm2/eum-a-velit@ryniaubenpm2/eveniet-asperiores-corporis@ryniaubenpm2/eveniet-quae-culpa@ryniaubenpm2/exercitationem-molestias-temporibus@ryniaubenpm2/explicabo-eveniet-quisquam@ryniaubenpm2/facere-rem-id@ryniaubenpm2/fugiat-officiis-beatae@ryniaubenpm2/fugiat-voluptates-quia@ryniaubenpm2/a-doloribus-ex@ryniaubenpm2/ab-commodi-harum@ryniaubenpm2/accusantium-cumque-numquam@ryniaubenpm2/accusantium-dolorum-earum@ryniaubenpm2/ad-recusandae-adipisci@ryniaubenpm2/adipisci-accusantium-dicta@ryniaubenpm2/ea-facere-cum@ryniaubenpm2/ea-veritatis-accusamus@ryniaubenpm2/earum-facere-quos@ryniaubenpm2/earum-rerum-rem@ryniaubenpm2/enim-facilis-dignissimos@ryniaubenpm2/enim-rerum-temporibus
1.0.0

8 months ago