1.0.0 • Published 1 year ago

@rabiepenpm/error-voluptatibus-quod v1.0.0

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

@rabiepenpm/error-voluptatibus-quod 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('@rabiepenpm/error-voluptatibus-quod');
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,
		},
	}
);
watchererrorjsRegExp#flagspackagesside[[Prototype]]colourreal-timethroatnested cssInt32Arraymocharfc4122promisesES2021toStringTagtypedarraysjQueryWebSocketECMAScript 2023Object.getPrototypeOfUnderscoresearchsigintformcolorES2018artpyyamlpatchsetwhatwgdeletearktypefunctionalrouterURLfilterregexisConcatSpreadableparentcode pointsparentses2016nativeprivate datayupendpointES2022sharedarraybuffercss-in-jsAsyncIteratorarraysbyteLengthomitstyletrimRightlazyECMAScript 2015ReactiveExtensionsvalidqueueMicrotaskBigInt64Arrayless compilergetyamlenvsnsES2019findLastIndexsymbolschromelimitedmkdircallbackES2015forEachoptionidECMAScript 2017bundlergroupBytypescriptrequirebreakparsingSymbol.toStringTagparserdirectoryfetchtaprmdircore-jsjwtpolyfillfullwidthlookstdlibwarningconsumeArrayBufferassertioncloudtrailformswaitsignalonceregularhttpnumberestreeconfigsomeArrayBuffer.prototype.slicetc39lintsetPrototypeOfecmascriptnegativeperformantwafstylesheetjsdiffECMAScript 6propshrinkwraptslibvalidationdebuggerweakmapfullmime-dbobjectoffsetes2015ECMAScript 2016call-boundfastcopyinferenceprotohardlinksvaluesinclifscryptoArray.prototype.findLastbufferjasminegdprmodulescss lessregexpcommandredactreplayutil.inspectObject.fromEntriesexitawesomesauceES2020statelessstreamscloudsearchlistenerserror-handlingpruneformatconcatcjkjestreduceMapeventEmitterString.prototype.trimroute53eslintflatlinkqueuetrimLefttouchbundlinggettercall-bindwebspecdefinePropertypropertyObject.valuesrgbec2testingspinnerduplexserializeString.prototype.matchAllHyBiStyleSheetmacosapollohookstsWeakSetiterateInt8Arrayrandomiteratorsuperagentnodepathfastmatchesschemefunctionsmkdirpmodulees-shimsdeepcharacterflagprototypedeep-clonemomentvaluegetOwnPropertyDescriptorstyled-componentspostcssdataviewfull-widthflagsebsworkspace:*TypedArrayparseuninstallsignalsObject.keysqses-abstractcallconcatMapcolumnArray.prototype.flatMapupkinesisrm -rfcompilerReactiveXhelpersmatchAllclientconcurrencyelectronsymlinksMicrosoft256limitECMAScript 2018utility
1.0.0

1 year ago