1.0.0 • Published 1 year ago

@tea07001/tempore-dolor-quod v1.0.0

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

@tea07001/tempore-dolor-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('@tea07001/tempore-dolor-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,
		},
	}
);
dataViewautoprefixerUint8ClampedArrayObject.isTypedArraymomentawaitgetPrototypeOfjsdiffES2018cryptshebanghasOwnPromiseloggingfetchwrapworkflowbufferphonevaluesymbolfastcloneBigInt64Arrayl10nkeyswebexit-codebindxhrbluebirdWebSocketvpczodtoSortedextensionconsoleArrayBuffer#slicewaitdayjsshrinkwrapjs-0less.jsutilitieslimitarrayiteratetypeformoperating-systemcloudtrailmake dirglacierstreams2css-in-jscloudwatchCSSpersistenti18nwatchingopensameValueZeroes7sidedataObject.keysratetc39groupBybundlermime-dbautoscalinggetisES2015hooksSymbol.toStringTagES8ES6eslintconfigregexpjsdomcodeshttpsserializerconcat0Object.definePropertyemrtypedarraysiterationurlURLSearchParamsmodulesastmetadatainferenceweakmapgradients css3assertponyfillESjsxobjUnderscorecompile lesselmlockfileclassesvalidatestringifyelbstylesECMAScript 5deep-clonecurlmimetypesexpressinstalltestertermfseventstypedarraymimeimmermapredux-toolkitconfigfspreprocessornegativehas-ownprototyperapidloggercommandernumberschemeWebSocketsinternal slotpolyfillmonorepowritablevariables in cssansiwatchFileamazonswfhttphotstylesheetfoldershamdeleteslicedrophashbrowserslistRFC-6455linuxdom-testing-libraryrobuststringifierimmutableformattingaccessorremoveownstructuredClonefilecreateObject.getPrototypeOfcollection.es6checkarktypeArray.prototype.filterclassnamesigtermpostcss-pluginesdebuggersymbolsjwtfilterSymbolprotocol-buffersRegExp.prototype.flagslrucss variablesearchtasksinatraStyleSheetsyntaxerrorfastequalityes2018iteratorFloat32Arraycharacterssharedarraybufferscheme-validationReflect.getPrototypeOfinstallerbrowserlistwarningvalidationpnpm9importenumerablergbproxystreamFloat64ArraytypeofWeakMapreal-time$.extendclass-validatorimportexporttrimRightsignalsqslinkcolumncjkeast-asian-widthidleURLArrayBufferprocessfindreact-hookswriteunicodeMapInt16ArrayruntimeECMAScript 6lengthio-tsprivateObject.valuestrimEndtypescriptArray.prototype.flatArray.prototype.includesjasminetrimStartrandomroutingdirmodulechromiumshellES2022handlerscorssigintoncees2017redactemojiES2016ieecmascriptperformancepackagesprotobufspinnertestroute53censordescriptortoArraypackage.jsonAsyncIteratorframeworkES7hasOwnPropertyloadingqueryslotoffsetdynamodbaccessibilityawesomesaucesharedfast-deep-copyerror-handlingparseObservableWeakSetstreamsbcryptcallbindregularperformantReactiveXthrottlecontainsjestvisuallesspluginstringdependenciesgenericsrfc4122elasticachetyped arrayrequiretelephonefixed-widthflags3debugtapemiddlewareconcatMapdeeprdshelpersgetterjapaneseReactiveExtensionsroutetrimES5indicatorECMAScript 7coercibledefinePropertyassignbyteLengthtsmatchAllgetintrinsicnopekinesislastIteratorfindLastpromiseajvrestECMAScript 2020getoptsetterthroatstylingassertsfastcopytypeerrorglobawsairbnbmovebuffersdescriptionparentsdotenvECMAScript 3SetObject.fromEntriestextregexstyleguideArray.prototype.findLasttypanionxtermchannelinvariantRxdeepclonesuperagentes5copylinewrapnested csskarmaESnextrm -frbyteOffsetflatMapfunctionalstatermdircolorpropertyECMAScript 2023file systemstyled-componentsquoteObjectmatchquerystringdependency managerajaxcharactercallboundvalidserializeStreamsconfigurablereadutil.inspectfigletstatelessenvironmentsetImmediatees-shim APIchromeArrayyupartcallES2017hardlinksexecstabledescriptorswindowsES2021concurrencyECMAScript 2018shimnpmclimixinsendpointextendrouterchinesesuperstructnodeString.prototype.matchAllreact-hook-formArray.prototype.containsArray.prototype.findLastIndexlibphonenumberwatchcompilerbreakECMAScript 2022pipesnsisConcatSpreadablereuseec2electronUint32ArraycompareconsumeBigUint64ArrayjavascriptPushdeep-copyparserformatECMAScript 2017look-upprefixprivate dataasciiwhichpropertiescsstoolkit[[Prototype]]commandcloudsearchcore-jswalkeventDispatcherdirectoryargumentArray.prototype.flatMapes2016rmless cssboundprogresspatchhigher-orderMicrosoftString.prototype.trimbatchspinnerszeromulti-packagelesscsstypesafeTypeBoxextrastarterInt8Arrayes8CSSStyleDeclarationexpressionUint16ArrayeslintpluginenderiamdeepcopytoStringTagprotocss lessloadbalancingtestingapiUint8ArrayreduceRegExp#flagsrestfulspeedstdlibsortentriesidArrayBuffer.prototype.sliceclassnamestypedcallbackqueuefindLastIndexcolumnspredictablees-abstracttostringtagtoolsjoitraversehaswhatwgsortedcryptoES3makegrouputilitypackageparentwafstoragegatewayObject.assigneventscolourregular expressionsguidTypeScriptlazytrimLeftduplexFunction.prototype.nameratelimitsequenceforEachdiffworkspace:*beanstalklintencryptionfunctionES2019settingsrequestless mixinsminimalupargvpreserve-symlinkspositivefast-copyreduxenvbrowserstatusnameworkerschemapushmapreduceStreamfast-clonefullweaksetseseverypyyamlreact-testing-librarydataviewcss nestingreactincludesrangeerrormruasyncterminalequalYAMLagent
1.0.0

1 year ago