8.7.111 • Published 11 months ago

@devtea2026/reiciendis-et-accusantium-maxime v8.7.111

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

@devtea2026/reiciendis-et-accusantium-maxime Version Badge

github actions coverage dependency status dev dependency status License Downloads

npm badge

An ES5 mostly-spec-compliant Object.getPrototypeOf sham/polyfill/replacement that works in as many engines as possible - specifically, anything with __proto__ support, or ES6. Built-in types will also work correctly in older engines.

This package implements the es-shim API interface. It works in an ES3-supported environment and complies with the spec.

Example

var getPrototypeOf = require('@devtea2026/reiciendis-et-accusantium-maxime');
var assert = require('assert');

assert.equal(getPrototypeOf(true), Boolean.prototype);
assert.equal(getPrototypeOf(42), Number.prototype);
assert.equal(getPrototypeOf(''), String.prototype);
assert.equal(getPrototypeOf(/a/g), RegExp.prototype);
assert.equal(getPrototypeOf(new Date()), Date.prototype);
assert.equal(getPrototypeOf(function () {}), Function.prototype);
assert.equal(getPrototypeOf([]), Array.prototype);
assert.equal(getPrototypeOf({}), Object.prototype);
var getPrototypeOf = require('@devtea2026/reiciendis-et-accusantium-maxime');
var assert = require('assert');
/* when Object.getPrototypeOf is not present */
delete Object.getPrototypeOf;
var shimmed = getPrototypeOf.shim();
assert.equal(shimmed, getPrototypeOf.getPolyfill());

assert.equal(Object.getPrototypeOf(true), Boolean.prototype);
assert.equal(Object.getPrototypeOf(42), Number.prototype);
assert.equal(Object.getPrototypeOf(''), String.prototype);
assert.equal(Object.getPrototypeOf(/a/g), RegExp.prototype);
assert.equal(Object.getPrototypeOf(new Date()), Date.prototype);
assert.equal(Object.getPrototypeOf(function () {}), Function.prototype);
assert.equal(Object.getPrototypeOf([]), Array.prototype);
assert.equal(Object.getPrototypeOf({}), Object.prototype);
var getPrototypeOf = require('@devtea2026/reiciendis-et-accusantium-maxime');
var assert = require('assert');
/* when Object.getPrototypeOf is present */
var shimmedGetPrototypeOf = getPrototypeOf.shim();
assert.equal(shimmedGetPrototypeOf, Object.getPrototypeOf);
assert.equal(Object.getPrototypeOf([]), Array.prototype);

Tests

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

8.7.111

11 months ago

8.7.110

11 months ago

8.7.109

11 months ago

8.7.108

11 months ago

8.7.107

11 months ago

8.7.106

11 months ago

8.7.105

11 months ago

8.7.104

11 months ago

8.6.93

12 months ago

7.5.74

1 year ago

7.5.75

1 year ago

7.5.76

12 months ago

4.1.30

1 year ago

4.1.31

1 year ago

4.1.32

1 year ago

4.1.33

1 year ago

7.5.77

12 months ago

7.5.78

12 months ago

7.5.79

12 months ago

5.2.54

1 year ago

5.2.53

1 year ago

4.1.34

1 year ago

5.2.52

1 year ago

4.1.35

1 year ago

5.2.51

1 year ago

4.1.36

1 year ago

5.2.50

1 year ago

7.5.84

12 months ago

7.5.85

12 months ago

7.5.86

12 months ago

7.5.80

12 months ago

7.5.81

12 months ago

7.5.82

12 months ago

7.5.83

12 months ago

7.3.69

1 year ago

5.2.49

1 year ago

5.2.48

1 year ago

4.1.27

1 year ago

4.1.28

1 year ago

4.1.29

1 year ago

4.1.23

1 year ago

4.1.24

1 year ago

4.1.25

1 year ago

4.1.26

1 year ago

7.3.70

1 year ago

8.7.103

11 months ago

8.7.102

11 months ago

8.7.101

11 months ago

8.7.100

11 months ago

6.2.64

1 year ago

6.2.65

1 year ago

6.2.62

1 year ago

6.2.63

1 year ago

7.6.88

12 months ago

7.6.87

12 months ago

7.6.86

12 months ago

4.2.42

1 year ago

4.2.43

1 year ago

4.2.44

1 year ago

7.6.89

12 months ago

4.2.45

1 year ago

6.2.60

1 year ago

6.2.61

1 year ago

4.2.40

1 year ago

4.2.41

1 year ago

4.2.46

1 year ago

4.2.47

1 year ago

4.2.48

1 year ago

3.1.23

1 year ago

3.1.22

1 year ago

6.2.59

1 year ago

7.6.91

12 months ago

7.6.90

12 months ago

7.4.72

1 year ago

7.4.73

1 year ago

6.2.54

1 year ago

7.6.93

12 months ago

7.4.74

1 year ago

7.6.92

12 months ago

6.2.57

1 year ago

6.2.58

1 year ago

7.4.70

1 year ago

6.2.55

1 year ago

7.4.71

1 year ago

6.2.56

1 year ago

4.2.39

1 year ago

4.2.36

1 year ago

4.2.37

1 year ago

4.2.38

1 year ago

3.0.21

1 year ago

3.0.22

1 year ago

3.0.20

1 year ago

7.2.68

1 year ago

7.2.67

1 year ago

7.2.69

1 year ago

7.2.66

1 year ago

7.2.65

1 year ago

3.0.19

1 year ago

8.7.98

11 months ago

8.7.99

11 months ago

8.7.96

11 months ago

8.7.97

11 months ago

8.7.94

11 months ago

8.7.95

11 months ago

8.7.93

11 months ago

3.0.18

1 year ago

3.0.17

1 year ago

3.0.16

1 year ago

3.0.14

1 year ago

3.0.15

1 year ago

3.0.13

1 year ago

3.0.12

1 year ago

3.0.11

1 year ago

3.0.10

1 year ago

3.0.9

1 year ago

3.0.8

1 year ago

3.0.7

1 year ago

3.0.6

1 year ago

2.0.6

1 year ago

2.0.5

1 year ago

2.0.4

1 year ago