summaryrefslogtreecommitdiff
path: root/desktop/node_modules/gopd
diff options
context:
space:
mode:
Diffstat (limited to 'desktop/node_modules/gopd')
-rw-r--r--desktop/node_modules/gopd/.eslintrc16
-rw-r--r--desktop/node_modules/gopd/.github/FUNDING.yml12
-rw-r--r--desktop/node_modules/gopd/CHANGELOG.md25
-rw-r--r--desktop/node_modules/gopd/LICENSE21
-rw-r--r--desktop/node_modules/gopd/README.md40
-rw-r--r--desktop/node_modules/gopd/index.js16
-rw-r--r--desktop/node_modules/gopd/package.json71
-rw-r--r--desktop/node_modules/gopd/test/index.js35
8 files changed, 236 insertions, 0 deletions
diff --git a/desktop/node_modules/gopd/.eslintrc b/desktop/node_modules/gopd/.eslintrc
new file mode 100644
index 0000000..e2550c0
--- /dev/null
+++ b/desktop/node_modules/gopd/.eslintrc
@@ -0,0 +1,16 @@
+{
+ "root": true,
+
+ "extends": "@ljharb",
+
+ "rules": {
+ "func-style": [2, "declaration"],
+ "id-length": 0,
+ "multiline-comment-style": 0,
+ "new-cap": [2, {
+ "capIsNewExceptions": [
+ "GetIntrinsic",
+ ],
+ }],
+ },
+}
diff --git a/desktop/node_modules/gopd/.github/FUNDING.yml b/desktop/node_modules/gopd/.github/FUNDING.yml
new file mode 100644
index 0000000..94a44a8
--- /dev/null
+++ b/desktop/node_modules/gopd/.github/FUNDING.yml
@@ -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/gopd
+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']
diff --git a/desktop/node_modules/gopd/CHANGELOG.md b/desktop/node_modules/gopd/CHANGELOG.md
new file mode 100644
index 0000000..f111eb1
--- /dev/null
+++ b/desktop/node_modules/gopd/CHANGELOG.md
@@ -0,0 +1,25 @@
+# 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/gopd/compare/v1.0.0...v1.0.1) - 2022-11-01
+
+### Commits
+
+- [Fix] actually export gOPD instead of dP [`4b624bf`](https://github.com/ljharb/gopd/commit/4b624bfbeff788c5e3ff16d9443a83627847234f)
+
+## v1.0.0 - 2022-11-01
+
+### Commits
+
+- Initial implementation, tests, readme [`0911e01`](https://github.com/ljharb/gopd/commit/0911e012cd642092bd88b732c161c58bf4f20bea)
+- Initial commit [`b84e33f`](https://github.com/ljharb/gopd/commit/b84e33f5808a805ac57ff88d4247ad935569acbe)
+- [actions] add reusable workflows [`12ae28a`](https://github.com/ljharb/gopd/commit/12ae28ae5f50f86e750215b6e2188901646d0119)
+- npm init [`280118b`](https://github.com/ljharb/gopd/commit/280118badb45c80b4483836b5cb5315bddf6e582)
+- [meta] add `auto-changelog` [`bb78de5`](https://github.com/ljharb/gopd/commit/bb78de5639a180747fb290c28912beaaf1615709)
+- [meta] create FUNDING.yml; add `funding` in package.json [`11c22e6`](https://github.com/ljharb/gopd/commit/11c22e6355bb01f24e7fac4c9bb3055eb5b25002)
+- [meta] use `npmignore` to autogenerate an npmignore file [`4f4537a`](https://github.com/ljharb/gopd/commit/4f4537a843b39f698c52f072845092e6fca345bb)
+- Only apps should have lockfiles [`c567022`](https://github.com/ljharb/gopd/commit/c567022a18573aa7951cf5399445d9840e23e98b)
diff --git a/desktop/node_modules/gopd/LICENSE b/desktop/node_modules/gopd/LICENSE
new file mode 100644
index 0000000..6abfe14
--- /dev/null
+++ b/desktop/node_modules/gopd/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2022 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.
diff --git a/desktop/node_modules/gopd/README.md b/desktop/node_modules/gopd/README.md
new file mode 100644
index 0000000..784e56a
--- /dev/null
+++ b/desktop/node_modules/gopd/README.md
@@ -0,0 +1,40 @@
+# gopd <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]
+
+`Object.getOwnPropertyDescriptor`, but accounts for IE's broken implementation.
+
+## Usage
+
+```javascript
+var gOPD = require('gopd');
+var assert = require('assert');
+
+if (gOPD) {
+ assert.equal(typeof gOPD, 'function', 'descriptors supported');
+ // use gOPD like Object.getOwnPropertyDescriptor here
+} else {
+ assert.ok(!gOPD, 'descriptors not supported');
+}
+```
+
+[package-url]: https://npmjs.org/package/gopd
+[npm-version-svg]: https://versionbadg.es/ljharb/gopd.svg
+[deps-svg]: https://david-dm.org/ljharb/gopd.svg
+[deps-url]: https://david-dm.org/ljharb/gopd
+[dev-deps-svg]: https://david-dm.org/ljharb/gopd/dev-status.svg
+[dev-deps-url]: https://david-dm.org/ljharb/gopd#info=devDependencies
+[npm-badge-png]: https://nodei.co/npm/gopd.png?downloads=true&stars=true
+[license-image]: https://img.shields.io/npm/l/gopd.svg
+[license-url]: LICENSE
+[downloads-image]: https://img.shields.io/npm/dm/gopd.svg
+[downloads-url]: https://npm-stat.com/charts.html?package=gopd
+[codecov-image]: https://codecov.io/gh/ljharb/gopd/branch/main/graphs/badge.svg
+[codecov-url]: https://app.codecov.io/gh/ljharb/gopd/
+[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/gopd
+[actions-url]: https://github.com/ljharb/gopd/actions
diff --git a/desktop/node_modules/gopd/index.js b/desktop/node_modules/gopd/index.js
new file mode 100644
index 0000000..fb6d3bb
--- /dev/null
+++ b/desktop/node_modules/gopd/index.js
@@ -0,0 +1,16 @@
+'use strict';
+
+var GetIntrinsic = require('get-intrinsic');
+
+var $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);
+
+if ($gOPD) {
+ try {
+ $gOPD([], 'length');
+ } catch (e) {
+ // IE 8 has a broken gOPD
+ $gOPD = null;
+ }
+}
+
+module.exports = $gOPD;
diff --git a/desktop/node_modules/gopd/package.json b/desktop/node_modules/gopd/package.json
new file mode 100644
index 0000000..d5e1fa4
--- /dev/null
+++ b/desktop/node_modules/gopd/package.json
@@ -0,0 +1,71 @@
+{
+ "name": "gopd",
+ "version": "1.0.1",
+ "description": "`Object.getOwnPropertyDescriptor`, but accounts for IE's broken implementation.",
+ "main": "index.js",
+ "exports": {
+ ".": "./index.js",
+ "./package.json": "./package.json"
+ },
+ "sideEffects": false,
+ "scripts": {
+ "prepack": "npmignore --auto --commentLines=autogenerated",
+ "prepublishOnly": "safe-publish-latest",
+ "prepublish": "not-in-publish || npm run prepublishOnly",
+ "lint": "eslint --ext=js,mjs .",
+ "postlint": "evalmd README.md",
+ "pretest": "npm run lint",
+ "tests-only": "tape 'test/**/*.js'",
+ "test": "npm run tests-only",
+ "posttest": "aud --production",
+ "version": "auto-changelog && git add CHANGELOG.md",
+ "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""
+ },
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/ljharb/gopd.git"
+ },
+ "keywords": [
+ "ecmascript",
+ "javascript",
+ "getownpropertydescriptor",
+ "property",
+ "descriptor"
+ ],
+ "author": "Jordan Harband <ljharb@gmail.com>",
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ },
+ "license": "MIT",
+ "bugs": {
+ "url": "https://github.com/ljharb/gopd/issues"
+ },
+ "homepage": "https://github.com/ljharb/gopd#readme",
+ "dependencies": {
+ "get-intrinsic": "^1.1.3"
+ },
+ "devDependencies": {
+ "@ljharb/eslint-config": "^21.0.0",
+ "aud": "^2.0.1",
+ "auto-changelog": "^2.4.0",
+ "eslint": "=8.8.0",
+ "evalmd": "^0.0.19",
+ "in-publish": "^2.0.1",
+ "npmignore": "^0.3.0",
+ "safe-publish-latest": "^2.0.0",
+ "tape": "^5.6.1"
+ },
+ "auto-changelog": {
+ "output": "CHANGELOG.md",
+ "template": "keepachangelog",
+ "unreleased": false,
+ "commitLimit": false,
+ "backfillLimit": false,
+ "hideCredit": true
+ },
+ "publishConfig": {
+ "ignore": [
+ ".github/workflows"
+ ]
+ }
+}
diff --git a/desktop/node_modules/gopd/test/index.js b/desktop/node_modules/gopd/test/index.js
new file mode 100644
index 0000000..0376bfb
--- /dev/null
+++ b/desktop/node_modules/gopd/test/index.js
@@ -0,0 +1,35 @@
+'use strict';
+
+var test = require('tape');
+var gOPD = require('../');
+
+test('gOPD', function (t) {
+ t.test('supported', { skip: !gOPD }, function (st) {
+ st.equal(typeof gOPD, 'function', 'is a function');
+
+ var obj = { x: 1 };
+ st.ok('x' in obj, 'property exists');
+
+ var desc = gOPD(obj, 'x');
+ st.deepEqual(
+ desc,
+ {
+ configurable: true,
+ enumerable: true,
+ value: 1,
+ writable: true
+ },
+ 'descriptor is as expected'
+ );
+
+ st.end();
+ });
+
+ t.test('not supported', { skip: gOPD }, function (st) {
+ st.notOk(gOPD, 'is falsy');
+
+ st.end();
+ });
+
+ t.end();
+});