3.3.89 • Published 1 year ago

@hishprorg/praesentium-fugiat v3.3.89

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

@hishprorg/praesentium-fugiat Version Badge

github actions coverage License Downloads

npm badge

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

Examples

const isAccessorDescriptor = require('@hishprorg/praesentium-fugiat');
const assert = require('assert');

const obj = {
	get foo() {},
	bar: { get: function() {} }
};

assert.equal(true, isAccessorDescriptor(obj, 'foo'));
assert.equal(false, isAccessorDescriptor(obj, 'bar'));

// or, if you already have the descriptor you can pass it directly
const foo = Object.getOwnPropertyDescriptor(obj, 'foo');
assert.equal(true, isAccessorDescriptor(foo));

const bar = Object.getOwnPropertyDescriptor(obj, 'bar');
assert.equal(false, isAccessorDescriptor(bar));

Related projects

You might also be interested in these projects:

  • is-data-descriptor: Returns true if a value has the characteristics of a valid JavaScript data descriptor.
  • is-descriptor: Returns true if a value has the characteristics of a valid JavaScript descriptor. Works for… more
  • is-object: Returns true if the value is an object and not an array or null.

Tests

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

3.3.89

1 year ago

3.3.88

1 year ago

3.3.87

1 year ago

3.3.86

1 year ago

3.3.85

1 year ago

3.3.84

1 year ago

3.3.83

1 year ago

3.3.82

1 year ago

3.3.81

1 year ago

3.2.81

1 year ago

3.2.80

1 year ago

3.2.79

1 year ago

3.2.78

1 year ago

3.2.77

1 year ago

3.2.76

1 year ago

3.2.75

1 year ago

3.2.74

1 year ago

3.2.73

1 year ago

3.2.72

1 year ago

3.2.71

1 year ago

3.2.70

1 year ago

3.2.69

1 year ago

3.2.68

1 year ago

3.2.67

1 year ago

3.2.66

1 year ago

3.2.65

1 year ago

3.2.64

1 year ago

3.2.63

1 year ago

3.2.62

1 year ago

3.2.61

1 year ago

3.1.61

1 year ago

3.1.60

1 year ago

3.1.59

1 year ago

3.0.59

1 year ago

3.0.58

1 year ago

3.0.57

1 year ago

3.0.56

1 year ago

3.0.55

1 year ago

3.0.54

1 year ago

3.0.53

1 year ago

3.0.52

1 year ago

3.0.51

1 year ago

3.0.50

1 year ago

3.0.49

1 year ago

2.0.49

1 year ago

2.0.48

1 year ago

2.0.47

1 year ago

2.0.46

1 year ago

2.0.45

1 year ago

2.0.44

1 year ago

2.0.43

1 year ago

2.0.42

1 year ago

1.0.42

1 year ago

1.0.41

1 year ago

1.0.40

1 year ago

1.0.39

1 year ago

1.0.38

1 year ago

1.0.37

1 year ago

1.0.36

1 year ago

1.0.35

1 year ago

1.0.34

1 year ago

1.0.33

1 year ago

1.0.32

1 year ago

1.0.31

1 year ago

1.0.30

1 year ago

1.0.29

1 year ago

1.0.28

1 year ago

1.0.27

1 year ago

1.0.26

1 year ago

1.0.25

1 year ago

1.0.24

1 year ago

1.0.23

1 year ago

1.0.22

1 year ago

1.0.21

1 year ago

1.0.20

1 year ago

1.0.19

1 year ago

1.0.18

1 year ago

1.0.17

1 year ago

1.0.16

1 year ago

1.0.15

1 year ago

1.0.14

1 year ago

1.0.13

1 year ago

1.0.12

1 year ago

1.0.11

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