5.10.115 • Published 11 months ago

@erboladaiorg/autem-dolores-ipsam v5.10.115

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

@erboladaiorg/autem-dolores-ipsam Version Badge

github actions coverage License Downloads

npm badge

Returns true if a value has the characteristics of a valid JavaScript data descriptor.

Examples

true when the descriptor has valid properties with valid values. false when not an object or when the object has invalid properties.

var isDataDesc = require('@erboladaiorg/autem-dolores-ipsam');
var assert = require('assert');

assert.equal(true, isDataDesc({ value: 'foo' }));
assert.equal(true, isDataDesc({ value: function () {} }));
assert.equal(true, isDataDesc({ value: true }));

assert.equal(false, isDataDesc('a'));
assert.equal(false, isDataDesc(null));
assert.equal(false, isDataDesc([]));

assert.equal(false, isDataDesc({ value: 'foo', bar: 'baz' }));
assert.equal(false, isDataDesc({ value: 'foo', bar: 'baz' }));
assert.equal(false, isDataDesc({ value: 'foo', get: function () {} }));
assert.equal(false, isDataDesc({ get: function () {}, value: 'foo' }) );
 
assert.equal(false, isDataDesc({ value: 'foo', enumerable: 'foo' }));
assert.equal(false, isDataDesc({ value: 'foo', configurable: 'foo' }));
assert.equal(false, isDataDesc({ value: 'foo', writable: 'foo' }));

Valid properties

The only valid data descriptor properties are the following:

  • configurable (required)
  • enumerable (required)
  • value (optional)
  • writable (optional)

To be a valid data descriptor, either value or writable must be defined.

Invalid properties

A descriptor may have additional invalid properties (an error will not be thrown).

var foo = {};

Object.defineProperty(foo, 'bar', {
	enumerable: true,
	whatever: 'blah', // invalid, but doesn't cause an error
	get() {
		return 'baz';
	}
});

assert.equal(foo.bar, 'baz');

Related projects

  • is-accessor-descriptor: Returns true if a value has the characteristics of a valid JavaScript accessor descriptor.
  • is-descriptor: Returns true if a value has the characteristics of a valid JavaScript descriptor. Works for… more

Tests

Simply clone the repo, npm install, and run npm test

ESpropertyfast-deep-copyCSSes2016nopeauthserializationtoArrayES2018avajesttypedarrayszeroprotocol-buffersHyBiwhichincludesformatgettapstyled-componentsstylesheetwalkingvaluesfindLastIndexsearchES2019argsgetPrototypeOfmomentremoves3ES2015superagentArray.prototype.findLastawaitdayjsfile systemlimitedapolloreusemobileduplexObject.valuescallbindrm -frwatchFileconsumeassignfseventsfastcloneterminalextendinstallreadablestreamestreeReactiveExtensionsescall-bindes-shimsdeterministiceslinta11yagenttesterownshimsymbolsES2020dependency managersameValueZeropicomatchoptimistpromisesform-validationrecursiveroutingstringifierarraysprotobufguiddropawsstreamskoreanaccessibilityemrsyntaxbuffercss variablecreateopencloneES3ObservablePushiscompilertextregexpropertiesvalidationmkdirsyntaxerrorgroupebsuuidArraystylingtypesafeperformantuninstalljavascriptnegativeESnextgradients csscloudtrailWebSocketrandommime-dbObject.fromEntriesmkdirstypeerrorhooksfind-upproxycss nestingassertclassnameec2browserelasticacheelmkinesisgraphqllanguagejwterrorio-tseslintpluginreadablebreakStreamsECMAScript 2018livesetImmediatetyped arrayES2017cloudfrontes6linkentriespredictablebundlingmapcssrequestvisualrequireyupfscall-boundvestiteratereact-hookscommand-lineprettylockfilehashWeakMapes2017byteOffsetlocationparserutilitiesthroatdefinePropertytestingnpmpackagesBigInt64Arraycensorprivate datacallimportformcolumnfastifylazywrapredirectarrayzodsafetostringtagsesrdsrapidsomefasthas-owninternal slotString.prototype.matchAllcollectionhookformhasOwnPropertychineseenderoptimizerconsoleString.prototype.trimkarmasidefunctionsclass-validatorpreserve-symlinksObject.assignes2018pathequalityarraybufferi18nmoveformattingSetcryptenumerablebyteLengthtelephoneescapecachenested cssUint16ArraystarterSymbolwalktrimArray.prototype.flatwordbreakasciifindLastansiinvariantautoprefixercodesviewiamcorsdatetimeforEachObject.keysES6structuredCloneconcatMapastECMAScript 2017regexpfindupgetopttestthrottleArrayBuffer#sliceamazontypesWeakSetstyleuphardlinksRegExp#flagsvariables in csssetpreprocessorwatchingECMAScript 7diffcss lesstoStringTagfetchglacierECMAScript 5batchxtermapicomparewarningiteratorspeedasyncdatacoercibletc39debuggenericsfilter@@toStringTaglesscsslibphonenumberqshttpfpsbcryptprefixstylesobj256flagairbnbreducersharedECMAScript 3Array.prototype.containsconnectdependenciesrobustgdpres5schemefast-cloneES7inspectfunctionwritabledeeptoobjectcolourArrayBufferlistenersObjectsuperstructObject.getPrototypeOfequalresolvereducefoldertrimStartassertionfluxinputcollection.es6eslintconfigArray.prototype.filtersettertsbootstrap cssfixed-widthECMAScript 2019utilrgbcopyCSSStyleDeclarationparentexpressgettermonorepodirmergelengthqueryfunctionalfilematchesgroupByhasOwngradients css3lastttyprototypehttpsnativelintextratrimEnd.envwhatwgfull-widthclassnamesides-abstractArray.prototype.findLastIndexECMAScript 2022shellsymlinksECMAScript 2023rangeerrorawesomesauceconcateast-asian-widthroute53limitstringchaiECMAScript 2021hastermreact-testing-libraryserializepackage managerurlRxJSArrayBuffer.prototype.sliceunicodebinddebuggerschemaregularemojijsonpathmatchAllscheme-validationchromemetadatavalidpositiveajaxless cssstoragegatewayURLSearchParamsgetintrinsicreduxhotfullloggerbundlerxhrquerystringimmutableworkspace:*installer$.extendjsonwriteinternaldom-testing-libraryexecslotsettingsloggingless mixinsUnderscoreArray.prototype.flatMapIteratorloadbalancinglook-upprogressprivateefficientkeystapejapaneselookFunction.prototype.nameBigUint64ArraywatchflatjsdomRFC-6455classesiterationTypeScriptstreams2ratelimitmodulenamesInt32ArraygetOwnPropertyDescriptorrateframeworkstdlibfindvariablesindicatorartdeleteJSONdeepcopyECMAScript 2020css-in-jsbluebirdfigletminimalcharactersObservablesflagsStreamloadingmiddlewareshrinkwrapreadinsqsjsxreplayiechannel__proto__statelessnodejsmimeArray.prototype.flattenmoduleses7jsbootstrap lesscorequotebddstableInt8ArrayoffsetcontainsUint8ClampedArraycomputed-typesstyleguidenumberargvutilityflattenregular expressionbrowserlistspecruntimeespreekeywidthassertsObject.entriesclishamtypanionprotocurl0Array.prototype.includesenvECMAScript 2015rfc4122fast-deep-clone
@erboladaiorg/adipisci-repellendus-corporis@erboladaiorg/adipisci-aspernatur-explicabo@erboladaiorg/alias-iure@erboladaiorg/blanditiis-facere@erboladaiorg/consectetur-incidunt-a@erboladaiorg/cupiditate-pariatur-optio@erboladaiorg/cupiditate-consectetur-porro@erboladaiorg/cupiditate-ab@erboladaiorg/error-atque-ea@erboladaiorg/eligendi-reiciendis-id@erboladaiorg/molestias-omnis-commodi@erboladaiorg/molestias-repellat@erboladaiorg/quibusdam-autem@erboladaiorg/qui-nostrum-quo@erboladaiorg/quibusdam-itaque-tempora@erboladaiorg/quibusdam-ipsa@erboladaiorg/quia-maiores@erboladaiorg/reiciendis-inventore@erboladaiorg/vel-culpa@erboladaiorg/vero-fuga@erboladaiorg/ut-excepturi-dolore@erboladaiorg/velit-corporis-maiores@erboladaiorg/velit-adipisci-dicta@erboladaiorg/animi-dignissimos@erboladaiorg/aliquid-quis-voluptates@erboladaiorg/aliquid-rerum-nam@erboladaiorg/id-qui@erboladaiorg/illum-illum@erboladaiorg/impedit-ipsum-natus@erboladaiorg/illo-dolor-ipsam@erboladaiorg/impedit-ratione-quasi@erboladaiorg/laboriosam-inventore-natus@erboladaiorg/natus-harum-voluptatum@erboladaiorg/natus-illo-iste@erboladaiorg/necessitatibus-pariatur-sint@erboladaiorg/odio-libero-mollitia@erboladaiorg/odio-repellendus-doloremque@erboladaiorg/sed-eligendi-accusantium@erboladaiorg/sapiente-molestiae@erboladaiorg/tenetur-magnam@erboladaiorg/tenetur-magni-ab@erboladaiorg/consequuntur-assumenda@erboladaiorg/dolorum-velit@erboladaiorg/et-placeat@erboladaiorg/et-minus@erboladaiorg/iusto-sit-quasi@erboladaiorg/molestiae-voluptatibus@erboladaiorg/nesciunt-quas-saepe@erboladaiorg/possimus-praesentium-sint@erboladaiorg/quidem-molestiae@erboladaiorg/rem-quisquam-quasi@erboladaiorg/tempora-nisi@erboladaiorg/tempora-quas@erboladaiorg/vitae-aut@erboladaiorg/voluptate-alias-voluptate@erboladaiorg/aliquid-quasi@erboladaiorg/aliquid-impedit@erboladaiorg/corporis-error@erboladaiorg/cum-commodi-consequatur@erboladaiorg/cumque-possimus-delectus@erboladaiorg/doloribus-quos-officia@erboladaiorg/error-expedita-alias@erboladaiorg/esse-esse@erboladaiorg/perspiciatis-error-reprehenderit@erboladaiorg/officiis-maiores@erboladaiorg/placeat-natus@erboladaiorg/quaerat-excepturi@erboladaiorg/quae-in-veniam@erboladaiorg/quod-id@erboladaiorg/tempore-illo@erboladaiorg/temporibus-eligendi@erboladaiorg/voluptatem-eius@erboladaiorg/voluptates-nisi-quibusdam@erboladaiorg/voluptatibus-beatae@erboladaiorg/dignissimos-ducimus-perferendis@erboladaiorg/deserunt-eos-eum@erboladaiorg/deserunt-nobis@erboladaiorg/expedita-accusantium-nisi@erboladaiorg/in-accusamus-architecto@erboladaiorg/incidunt-dicta-magnam@erboladaiorg/nisi-id-consequatur@erboladaiorg/unde-sit@erboladaiorg/ut-dignissimos-laborum@erboladaiorg/distinctio-illum-harum@erboladaiorg/distinctio-provident-voluptatem@erboladaiorg/dolor-pariatur-modi@erboladaiorg/eaque-eaque-saepe@erboladaiorg/ducimus-necessitatibus-omnis@erboladaiorg/ea-saepe@erboladaiorg/itaque-incidunt-quis@erboladaiorg/libero-a@erboladaiorg/libero-possimus@erboladaiorg/magnam-cumque-non@erboladaiorg/porro-laboriosam@erboladaiorg/quas-officiis@erboladaiorg/quam-id-itaque@erboladaiorg/quod-nesciunt-cum@erboladaiorg/totam-mollitia-tenetur@erboladaiorg/asperiores-earum-quaerat@erboladaiorg/assumenda-cupiditate
3.6.63

1 year ago

3.8.85

1 year ago

3.6.62

1 year ago

3.8.83

1 year ago

3.8.84

1 year ago

3.8.81

1 year ago

3.8.82

1 year ago

3.8.80

1 year ago

4.9.111

11 months ago

2.3.39

1 year ago

2.3.38

1 year ago

5.10.115

11 months ago

2.5.58

1 year ago

2.5.59

1 year ago

2.3.37

1 year ago

2.5.54

1 year ago

2.5.55

1 year ago

2.5.56

1 year ago

2.5.57

1 year ago

2.5.51

1 year ago

2.5.52

1 year ago

2.5.53

1 year ago

2.5.60

1 year ago

4.8.85

1 year ago

4.8.87

1 year ago

4.8.86

1 year ago

4.8.89

12 months ago

4.8.88

1 year ago

2.3.45

1 year ago

2.3.42

1 year ago

2.3.41

1 year ago

2.3.44

1 year ago

2.3.43

1 year ago

1.1.16

1 year ago

1.1.15

1 year ago

2.3.40

1 year ago

1.1.19

1 year ago

1.1.18

1 year ago

1.1.17

1 year ago

3.8.78

1 year ago

3.8.79

1 year ago

3.8.76

1 year ago

3.8.77

1 year ago

5.9.113

11 months ago

3.8.74

1 year ago

1.1.23

1 year ago

5.9.112

11 months ago

3.8.75

1 year ago

1.1.22

1 year ago

5.9.115

11 months ago

1.1.21

1 year ago

5.9.114

11 months ago

3.8.73

1 year ago

1.1.20

1 year ago

1.1.26

1 year ago

5.9.111

11 months ago

1.1.25

1 year ago

1.1.24

1 year ago

4.8.101

12 months ago

4.8.102

12 months ago

4.8.100

12 months ago

4.8.105

12 months ago

4.8.106

12 months ago

4.8.103

12 months ago

4.8.104

12 months ago

4.8.109

11 months ago

3.7.73

1 year ago

4.8.107

12 months ago

3.7.71

1 year ago

4.8.108

12 months ago

3.7.72

1 year ago

3.7.70

1 year ago

2.6.60

1 year ago

2.6.61

1 year ago

4.8.90

12 months ago

4.8.92

12 months ago

4.8.91

12 months ago

4.8.94

12 months ago

4.8.93

12 months ago

4.8.96

12 months ago

4.8.95

12 months ago

4.8.98

12 months ago

4.8.97

12 months ago

4.8.99

12 months ago

4.8.110

11 months ago

4.8.111

11 months ago

2.4.47

1 year ago

2.4.46

1 year ago

2.4.49

1 year ago

2.4.48

1 year ago

2.4.45

1 year ago

2.6.62

1 year ago

2.2.37

1 year ago

2.2.35

1 year ago

2.2.36

1 year ago

2.4.50

1 year ago

1.2.27

1 year ago

1.2.28

1 year ago

2.4.51

1 year ago

1.2.26

1 year ago

3.7.68

1 year ago

1.2.29

1 year ago

3.7.69

1 year ago

3.7.66

1 year ago

3.7.67

1 year ago

3.7.64

1 year ago

3.7.65

1 year ago

1.2.30

1 year ago

1.2.31

1 year ago

1.2.34

1 year ago

3.7.63

1 year ago

1.2.35

1 year ago

1.2.32

1 year ago

1.2.33

1 year ago

1.1.14

1 year ago

1.1.12

1 year ago

1.0.11

1 year ago

1.1.11

1 year ago

1.1.13

1 year ago

1.0.10

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

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago