Gathering detailed insights and metrics for @teamteanpm2024/reprehenderit-magni-id
Gathering detailed insights and metrics for @teamteanpm2024/reprehenderit-magni-id
Gathering detailed insights and metrics for @teamteanpm2024/reprehenderit-magni-id
Gathering detailed insights and metrics for @teamteanpm2024/reprehenderit-magni-id
npm install @teamteanpm2024/reprehenderit-magni-id
Typescript
Module System
Node Version
NPM Version
55.5
Supply Chain
83.2
Quality
75.3
Maintenance
100
Vulnerability
100
License
Cumulative downloads
Total Downloads
Last Day
0%
4
Compared to previous day
Last Week
0%
4
Compared to previous week
Last Month
-58.3%
5
Compared to previous month
Last Year
0%
300
Compared to previous year
41
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.
1var getPrototypeOf = require('@teamteanpm2024/reprehenderit-magni-id');
2var assert = require('assert');
3
4assert.equal(getPrototypeOf(true), Boolean.prototype);
5assert.equal(getPrototypeOf(42), Number.prototype);
6assert.equal(getPrototypeOf(''), String.prototype);
7assert.equal(getPrototypeOf(/a/g), RegExp.prototype);
8assert.equal(getPrototypeOf(new Date()), Date.prototype);
9assert.equal(getPrototypeOf(function () {}), Function.prototype);
10assert.equal(getPrototypeOf([]), Array.prototype);
11assert.equal(getPrototypeOf({}), Object.prototype);
1var getPrototypeOf = require('@teamteanpm2024/reprehenderit-magni-id');
2var assert = require('assert');
3/* when Object.getPrototypeOf is not present */
4delete Object.getPrototypeOf;
5var shimmed = getPrototypeOf.shim();
6assert.equal(shimmed, getPrototypeOf.getPolyfill());
7
8assert.equal(Object.getPrototypeOf(true), Boolean.prototype);
9assert.equal(Object.getPrototypeOf(42), Number.prototype);
10assert.equal(Object.getPrototypeOf(''), String.prototype);
11assert.equal(Object.getPrototypeOf(/a/g), RegExp.prototype);
12assert.equal(Object.getPrototypeOf(new Date()), Date.prototype);
13assert.equal(Object.getPrototypeOf(function () {}), Function.prototype);
14assert.equal(Object.getPrototypeOf([]), Array.prototype);
15assert.equal(Object.getPrototypeOf({}), Object.prototype);
1var getPrototypeOf = require('@teamteanpm2024/reprehenderit-magni-id'); 2var assert = require('assert'); 3/* when Object.getPrototypeOf is present */ 4var shimmedGetPrototypeOf = getPrototypeOf.shim(); 5assert.equal(shimmedGetPrototypeOf, Object.getPrototypeOf); 6assert.equal(Object.getPrototypeOf([]), Array.prototype);
Simply clone the repo, npm install
, and run npm test
No vulnerabilities found.
No security vulnerabilities found.