6.15.131 • Published 1 year ago

@womorg/animated v6.15.131

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year 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

1 year ago

5.12.108

1 year ago

6.14.121

1 year ago

6.14.120

1 year ago

6.14.123

1 year ago

6.14.122

1 year ago

5.12.113

1 year ago

5.12.112

1 year ago

5.12.111

1 year ago

5.12.110

1 year ago

6.14.119

1 year ago

6.12.115

1 year ago

5.12.115

1 year ago

6.12.116

1 year ago

5.12.114

1 year ago

6.15.126

1 year ago

6.15.125

1 year ago

6.15.124

1 year ago

6.13.116

1 year ago

6.15.123

1 year ago

6.13.117

1 year ago

6.13.118

1 year ago

6.15.129

1 year ago

6.13.119

1 year ago

6.15.128

1 year ago

6.15.127

1 year ago

6.15.131

1 year ago

6.15.130

1 year ago

5.12.107

1 year ago

5.12.106

1 year ago

5.12.105

1 year ago

5.12.104

1 year ago

5.12.103

1 year ago

5.12.102

1 year ago

5.12.101

1 year ago

5.12.99

1 year ago

5.12.98

1 year ago

4.12.98

1 year ago

5.12.100

1 year ago

4.12.97

1 year ago

4.12.96

1 year ago

4.12.95

1 year ago

4.12.91

1 year ago

4.12.94

1 year ago

4.12.93

1 year ago

4.12.92

1 year ago

4.10.89

1 year ago

4.12.90

1 year ago

4.11.90

1 year ago

4.10.90

1 year ago

4.10.87

1 year ago

4.10.88

1 year ago

4.10.85

1 year ago

4.10.86

1 year ago

4.10.83

1 year ago

4.10.84

1 year ago

4.10.82

1 year ago

4.10.80

1 year ago

4.10.81

1 year ago

4.10.79

1 year ago

4.10.76

1 year ago

4.10.77

1 year ago

4.10.78

1 year ago

4.10.75

1 year ago

3.9.59

1 year ago

3.8.59

1 year ago

4.10.72

1 year ago

4.10.73

1 year ago

4.10.74

1 year 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