1.1.21 • Published 1 year ago

@devtea2027/non-sunt-officiis-porro v1.1.21

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

@devtea2027/non-sunt-officiis-porro 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('@devtea2027/non-sunt-officiis-porro');
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,
		},
	}
);
yupoptimistTypeScripttrimEndvisualiehas-ownpropertybounditeratorstreamsRxJSwatcherproxywatchstreams2variables in csscallbackstyleshooksrestfulsidewhichwritablepackage.jsonvalidstyleguideiterateawsdiffcssxdgdirectoryhigher-orderfilterextendshebangmovePushbufferstreamrandomgetOwnPropertyDescriptorglacierviewformsopenspackagesdom-testing-libraryes-shim APIstringifierbindtypesweakmapinautoprefixerES2022testerObjecttextfsfunctionalInt32ArraycloudformationimportappomitECMAScript 2023ObservablessimpledbECMAScript 2020throttlexdg-openECMAScript 7ArrayBuffer.prototype.slicequerystringifymake diropenerhttptaskredactponyfillratelimitmulti-packageenumerablestructuredCloneoptimizermimetypessharedarraybufferfullpostcss-plugincloudwatchrmenvironmentsenvtoobjectprefixes-shimsweblimitdeleteUint32ArraycacheArray.prototype.flatfileArray.prototype.includescorsflagsemitstartdeep-clonepackage manageresfile systemfastifyes8variablesownscheme-validationsnsRegExp.prototype.flagsincludesupserializewritespawnwaflanguageintrinsicfseventsstarterprototypebyteflattenformattingeventsECMAScript 3openprunejavascriptpostcsselectronWeakSetshrinkwrapprotocodesrapidRegExp#flagscreatereadflattapbatchjsxRFC-6455xtermtypeofcss-in-jsentriessinatralesscssinputtsBigUint64Arraydependenciesrouterregular expressionsES2020deterministicsetterpersistenteventEmitterclassnamesoffsetmkdirses6urlstylingWebSocketsbootstrap lessobjconfigurableurlsdefinePropertyes-abstractcircularconcurrencysliceutil.inspectloadbalancingchineseequalxhrworkerpyyamlbootstrap cssmiddlewarecommanderpasswordlintargumentspromisetc39bddlookauthcryptochromiumcolumnsgetPrototypeOffpsfetchUint16ArrayinvariantprogressECMAScript 2022byteLengthlengthexebcryptless csssymlinkreactansimixinsjoifind-upvalidatepreserve-symlinkscurlfastcopywarningnegativebluebirdcorecharacterskarmapnpm9form-validationformString.prototype.trimshellObservablecheckid__proto__idleaccessibilityrangeerrorrequireES5testformatreuseparentssignal
1.1.21

1 year ago

1.1.20

1 year ago

1.1.19

1 year ago

1.1.18

1 year ago

1.1.17

1 year ago

1.1.16

1 year ago

1.1.15

1 year ago

1.1.14

1 year ago

1.1.13

1 year ago

1.1.12

1 year ago

1.1.11

1 year ago

1.1.10

1 year ago

1.1.9

1 year ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago