feat:node-modules
This commit is contained in:
10
node_modules/get-proto/.eslintrc
generated
vendored
Normal file
10
node_modules/get-proto/.eslintrc
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"root": true,
|
||||
|
||||
"extends": "@ljharb",
|
||||
|
||||
"rules": {
|
||||
"id-length": "off",
|
||||
"sort-keys": "off",
|
||||
},
|
||||
}
|
||||
12
node_modules/get-proto/.github/FUNDING.yml
generated
vendored
Normal file
12
node_modules/get-proto/.github/FUNDING.yml
generated
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
# These are supported funding model platforms
|
||||
|
||||
github: [ljharb]
|
||||
patreon: # Replace with a single Patreon username
|
||||
open_collective: # Replace with a single Open Collective username
|
||||
ko_fi: # Replace with a single Ko-fi username
|
||||
tidelift: npm/get-proto
|
||||
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
||||
liberapay: # Replace with a single Liberapay username
|
||||
issuehunt: # Replace with a single IssueHunt username
|
||||
otechie: # Replace with a single Otechie username
|
||||
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
|
||||
9
node_modules/get-proto/.nycrc
generated
vendored
Normal file
9
node_modules/get-proto/.nycrc
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"all": true,
|
||||
"check-coverage": false,
|
||||
"reporter": ["text-summary", "text", "html", "json"],
|
||||
"exclude": [
|
||||
"coverage",
|
||||
"test"
|
||||
]
|
||||
}
|
||||
21
node_modules/get-proto/CHANGELOG.md
generated
vendored
Normal file
21
node_modules/get-proto/CHANGELOG.md
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
# Changelog
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [v1.0.1](https://github.com/ljharb/get-proto/compare/v1.0.0...v1.0.1) - 2025-01-02
|
||||
|
||||
### Commits
|
||||
|
||||
- [Fix] for the `Object.getPrototypeOf` window, throw for non-objects [`7fe6508`](https://github.com/ljharb/get-proto/commit/7fe6508b71419ebe1976bedb86001d1feaeaa49a)
|
||||
|
||||
## v1.0.0 - 2025-01-01
|
||||
|
||||
### Commits
|
||||
|
||||
- Initial implementation, tests, readme, types [`5c70775`](https://github.com/ljharb/get-proto/commit/5c707751e81c3deeb2cf980d185fc7fd43611415)
|
||||
- Initial commit [`7c65c2a`](https://github.com/ljharb/get-proto/commit/7c65c2ad4e33d5dae2f219ebe1a046ae2256972c)
|
||||
- npm init [`0b8cf82`](https://github.com/ljharb/get-proto/commit/0b8cf824c9634e4a34ef7dd2a2cdc5be6ac79518)
|
||||
- Only apps should have lockfiles [`a6d1bff`](https://github.com/ljharb/get-proto/commit/a6d1bffc364f5828377cea7194558b2dbef7aea2)
|
||||
21
node_modules/get-proto/LICENSE
generated
vendored
Normal file
21
node_modules/get-proto/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2025 Jordan Harband
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
5
node_modules/get-proto/Object.getPrototypeOf.d.ts
generated
vendored
Normal file
5
node_modules/get-proto/Object.getPrototypeOf.d.ts
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
declare function getProto<O extends object>(object: O): object | null;
|
||||
|
||||
declare const x: typeof getProto | null;
|
||||
|
||||
export = x;
|
||||
6
node_modules/get-proto/Object.getPrototypeOf.js
generated
vendored
Normal file
6
node_modules/get-proto/Object.getPrototypeOf.js
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
'use strict';
|
||||
|
||||
var $Object = require('es-object-atoms');
|
||||
|
||||
/** @type {import('./Object.getPrototypeOf')} */
|
||||
module.exports = $Object.getPrototypeOf || null;
|
||||
50
node_modules/get-proto/README.md
generated
vendored
Normal file
50
node_modules/get-proto/README.md
generated
vendored
Normal file
@@ -0,0 +1,50 @@
|
||||
# get-proto <sup>[![Version Badge][npm-version-svg]][package-url]</sup>
|
||||
|
||||
[![github actions][actions-image]][actions-url]
|
||||
[![coverage][codecov-image]][codecov-url]
|
||||
[![License][license-image]][license-url]
|
||||
[![Downloads][downloads-image]][downloads-url]
|
||||
|
||||
[![npm badge][npm-badge-png]][package-url]
|
||||
|
||||
Robustly get the [[Prototype]] of an object. Uses the best available method.
|
||||
|
||||
## Getting started
|
||||
|
||||
```sh
|
||||
npm install --save get-proto
|
||||
```
|
||||
|
||||
## Usage/Examples
|
||||
|
||||
```js
|
||||
const assert = require('assert');
|
||||
const getProto = require('get-proto');
|
||||
|
||||
const a = { a: 1, b: 2, [Symbol.toStringTag]: 'foo' };
|
||||
const b = { c: 3, __proto__: a };
|
||||
|
||||
assert.equal(getProto(b), a);
|
||||
assert.equal(getProto(a), Object.prototype);
|
||||
assert.equal(getProto({ __proto__: null }), null);
|
||||
```
|
||||
|
||||
## Tests
|
||||
|
||||
Clone the repo, `npm install`, and run `npm test`
|
||||
|
||||
[package-url]: https://npmjs.org/package/get-proto
|
||||
[npm-version-svg]: https://versionbadg.es/ljharb/get-proto.svg
|
||||
[deps-svg]: https://david-dm.org/ljharb/get-proto.svg
|
||||
[deps-url]: https://david-dm.org/ljharb/get-proto
|
||||
[dev-deps-svg]: https://david-dm.org/ljharb/get-proto/dev-status.svg
|
||||
[dev-deps-url]: https://david-dm.org/ljharb/get-proto#info=devDependencies
|
||||
[npm-badge-png]: https://nodei.co/npm/get-proto.png?downloads=true&stars=true
|
||||
[license-image]: https://img.shields.io/npm/l/get-proto.svg
|
||||
[license-url]: LICENSE
|
||||
[downloads-image]: https://img.shields.io/npm/dm/get-proto.svg
|
||||
[downloads-url]: https://npm-stat.com/charts.html?package=get-proto
|
||||
[codecov-image]: https://codecov.io/gh/ljharb/get-proto/branch/main/graphs/badge.svg
|
||||
[codecov-url]: https://app.codecov.io/gh/ljharb/get-proto/
|
||||
[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/get-proto
|
||||
[actions-url]: https://github.com/ljharb/get-proto/actions
|
||||
3
node_modules/get-proto/Reflect.getPrototypeOf.d.ts
generated
vendored
Normal file
3
node_modules/get-proto/Reflect.getPrototypeOf.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
declare const x: typeof Reflect.getPrototypeOf | null;
|
||||
|
||||
export = x;
|
||||
4
node_modules/get-proto/Reflect.getPrototypeOf.js
generated
vendored
Normal file
4
node_modules/get-proto/Reflect.getPrototypeOf.js
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
'use strict';
|
||||
|
||||
/** @type {import('./Reflect.getPrototypeOf')} */
|
||||
module.exports = (typeof Reflect !== 'undefined' && Reflect.getPrototypeOf) || null;
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user