6.15.131 • Published 10 months ago

@womorg/animated v6.15.131

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

@womorg/animated 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('@womorg/animated');
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

accessorchanneltranspileconfiggroupBycss variabletypeofsimpledbtypescriptes5qsObject.valuespropertiesgetOwnPropertyDescriptordirectorytoolsthroatdeep-copysetPrototypeOftrimLefthigher-orderfromdotenvloggersanitizeES2018momenttapeauthpyyamlcryptCSSStyleDeclarationfast-deep-clonestringifierimmutabletranspilerdropprivate dataFloat32ArrayObject.iswindowsdataviewes2015stylingsignaldombeanstalkunicodekeyajaxutilitylessirqObservablesscheme-validationrmdirhandlersobjectObject.entriesreaddebugemojiwaapiES2023shellurlworkflowassertworkspace:*jesttypeshimcolumnscore-jsemitqueueMicrotaskdirthreechinesewatchFilereact-testing-libraryrmcircularcompile lessArray.prototype.findLastIndexmimetypesWebSocketinternalIteratorlook-upframeworkpoint-freeletjsonpathdescriptorapimacoscacheinputflattestreactgetPrototypeOfsuperstructECMAScript 2016prettymodulesspinnersECMAScript 7typesafeArray.prototype.includeshttpcallbddformattinghasOwnPropertyexitcensoremrES7assignkoreanclassnamelimitedcolumnECMAScript 5eslintplugintrimECMAScript 6byteLengthcomparerangeerrorencryptionsharediteratefindLastES2015wafloggingutilserrorwatchmime-dbomitObject.assignstableArray.prototype.flat@@toStringTagObject.keysArrayBuffer.prototype.sliceECMAScript 3pruneArray.prototype.flattenlinuxtostringtagUint8Arraypostcss-plugincommandeslint-pluginbootstrap lessiamflagweaksetpasswordes2016Array.prototype.containsconcatMapchromiumfpsyntaxsymbolspositivelimithardlinksfunctionsECMAScript 2020WeakSetasciivpcReactiveExtensionses2018256colorbrowserartregexpdeleteclassnamesCSSdragbytesafeglacierArray.prototype.flatMapgradients csswordwraptraverse
@womorg/architecto-hic-sunt@womorg/deleniti-nostrum-et@womorg/deleniti-velit-voluptas@womorg/est-suscipit-quisquam@womorg/et-magni-consequatur@womorg/iure-quasi-reprehenderit@womorg/ipsum-quos-similique@womorg/quod-odit-assumenda@womorg/est-quis-quae@womorg/labore-tempora-recusandae@womorg/laborum-voluptates-molestias@womorg/psychic-potato@womorg/porro-laboriosam-quod@womorg/repudiandae-maiores-quis@womorg/shiny-engine@womorg/adipisci-enim-illum@womorg/aspernatur-quisquam-ipsam@womorg/dolor-accusamus-fugit@womorg/fugiat-animi-libero@womorg/harum-fugiat-illo@womorg/hic-deserunt-voluptas@womorg/neque-eum-quia@womorg/occaecati-a-iusto@womorg/nostrum-nulla-laboriosam@womorg/porro-impedit-suscipit@womorg/perferendis-unde-impedit@womorg/recusandae-eveniet-quos@womorg/dolorum-harum-explicabo@womorg/doloribus-quasi-in@womorg/illo-ea-maxime@womorg/illo-earum-eveniet@womorg/mollitia-quaerat-repellat@womorg/necessitatibus-cupiditate-fugit@womorg/neque-earum-aspernatur@womorg/quibusdam-tenetur-ratione@womorg/reiciendis-eum-voluptatum@womorg/reimagined-enigma@womorg/accusantium-commodi-officia@womorg/accusantium-doloribus-quod@womorg/blanditiis-ipsum-maxime@womorg/computing-machine@womorg/consequuntur-consequatur-accusamus@womorg/cum-dolorem-corrupti@womorg/eos-blanditiis-excepturi@womorg/enim-nisi-vero@womorg/illum-aut-ut@womorg/ipsam-sint-eaque@womorg/omnis-laborum-asperiores@womorg/occaecati-ducimus-laboriosam@womorg/optio-quia-vero@womorg/saepe-enim-dolor@womorg/adipisci-maxime-facilis@womorg/aperiam-ullam-accusamus@womorg/blanditiis-fugiat-reprehenderit@womorg/aut-laboriosam-accusantium@womorg/autem-tempora-rem@womorg/ducimus-officia-voluptatum@womorg/ea-laborum-magnam@womorg/eum-nesciunt-quas@womorg/fantastic-giggle@womorg/excepturi-dolorem-illum@womorg/exercitationem-atque-voluptatem@womorg/literate-octo@womorg/quasi-eius-optio@womorg/quidem-assumenda-amet@womorg/quis-doloribus-maxime@womorg/repudiandae-dolorum-unde@womorg/sed-nihil-quos@womorg/similique-illo-dolorem@womorg/totam-expedita-quas@womorg/vitae-tenetur-pariatur@womorg/voluptatem-voluptatibus-illum@womorg/voluptates-vero-occaecati@womorg/totam-commodi-ratione@womorg/temporibus-corporis-omnis@womorg/studious-telegram@womorg/tempora-maxime-voluptates@womorg/totam-eum-ipsum@womorg/ullam-perspiciatis-excepturi@womorg/studiou@womorg/ut-dolorem-corrupti@womorg/ut-qui-iste
5.12.109

11 months ago

5.12.108

11 months ago

6.14.121

10 months ago

6.14.120

10 months ago

6.14.123

10 months ago

6.14.122

10 months ago

5.12.113

11 months ago

5.12.112

11 months ago

5.12.111

11 months ago

5.12.110

11 months ago

6.14.119

10 months ago

6.12.115

11 months ago

5.12.115

11 months ago

6.12.116

11 months ago

5.12.114

11 months ago

6.15.126

10 months ago

6.15.125

10 months ago

6.15.124

10 months ago

6.13.116

11 months ago

6.15.123

10 months ago

6.13.117

10 months ago

6.13.118

10 months ago

6.15.129

10 months ago

6.13.119

10 months ago

6.15.128

10 months ago

6.15.127

10 months ago

6.15.131

10 months ago

6.15.130

10 months ago

5.12.107

11 months ago

5.12.106

11 months ago

5.12.105

11 months ago

5.12.104

11 months ago

5.12.103

11 months ago

5.12.102

11 months ago

5.12.101

11 months ago

5.12.99

11 months ago

5.12.98

11 months ago

4.12.98

11 months ago

5.12.100

11 months ago

4.12.97

11 months ago

4.12.96

11 months ago

4.12.95

11 months ago

4.12.91

11 months ago

4.12.94

11 months ago

4.12.93

11 months ago

4.12.92

11 months ago

4.10.89

12 months ago

4.12.90

11 months ago

4.11.90

12 months ago

4.10.90

12 months ago

4.10.87

12 months ago

4.10.88

12 months ago

4.10.85

12 months ago

4.10.86

12 months ago

4.10.83

12 months ago

4.10.84

12 months ago

4.10.82

12 months ago

4.10.80

12 months ago

4.10.81

12 months ago

4.10.79

12 months ago

4.10.76

12 months ago

4.10.77

12 months ago

4.10.78

12 months ago

4.10.75

12 months ago

3.9.59

1 year ago

3.8.59

1 year ago

4.10.72

12 months ago

4.10.73

12 months ago

4.10.74

12 months ago

3.10.64

1 year ago

3.10.65

1 year ago

3.10.62

1 year ago

3.10.63

1 year ago

3.10.68

1 year ago

3.10.69

1 year ago

3.10.66

1 year ago

3.10.67

1 year ago

3.10.61

1 year ago

4.10.71

1 year ago

3.9.60

1 year ago

3.9.61

1 year ago

3.7.59

1 year ago

3.6.48

1 year ago

3.6.47

1 year ago

3.7.57

1 year ago

3.6.46

1 year ago

3.7.58

1 year ago

3.6.45

1 year ago

3.7.55

1 year ago

3.6.44

1 year ago

3.7.56

1 year ago

3.6.43

1 year ago

3.7.53

1 year ago

3.6.42

1 year ago

3.7.54

1 year ago

3.6.41

1 year ago

3.6.49

1 year ago

3.10.71

1 year ago

3.10.70

1 year ago

3.7.51

1 year ago

3.7.52

1 year ago

3.6.51

1 year ago

3.6.50

1 year ago

3.5.41

1 year ago

3.5.39

1 year ago

3.5.38

1 year ago

3.5.37

1 year ago

3.5.40

1 year ago

3.5.36

1 year ago

3.5.35

1 year ago

3.5.34

1 year ago

3.4.25

1 year ago

3.4.26

1 year ago

3.4.27

1 year ago

3.5.33

1 year ago

3.4.28

1 year ago

3.4.29

1 year ago

3.3.24

1 year ago

3.3.25

1 year ago

3.4.30

1 year ago

3.4.31

1 year ago

3.4.32

1 year ago

3.4.33

1 year ago

2.3.23

1 year ago

3.3.23

1 year ago

2.3.20

1 year ago

2.3.22

1 year ago

2.3.21

1 year ago

2.2.20

1 year ago

2.2.19

1 year ago

2.2.18

1 year ago

2.2.17

1 year ago

2.2.16

1 year ago

2.1.16

1 year ago

2.1.15

1 year ago

2.1.14

1 year ago

2.1.13

1 year ago

2.1.12

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.1.8

1 year ago

1.1.7

1 year ago

1.1.6

1 year ago

1.1.5

1 year ago

1.1.4

1 year ago

1.1.3

1 year ago

1.1.2

1 year ago

1.1.1

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago