Initial Save

This commit is contained in:
jackbeeby
2025-03-28 12:30:19 +11:00
parent e381994f19
commit d8773925e8
9910 changed files with 982718 additions and 0 deletions

17
node_modules/is-array-buffer/.eslintrc generated vendored Normal file
View File

@@ -0,0 +1,17 @@
{
"root": true,
"extends": "@ljharb",
"globals": {
"DataView": false,
},
"rules": {
"new-cap": ["error", {
"capIsNewExceptions": [
"GetIntrinsic",
],
}],
},
}

12
node_modules/is-array-buffer/.github/FUNDING.yml generated vendored Normal file
View 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/is-array-buffer
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/is-array-buffer/.nycrc generated vendored Normal file
View File

@@ -0,0 +1,9 @@
{
"all": true,
"check-coverage": false,
"reporter": ["text-summary", "text", "html", "json"],
"exclude": [
"coverage",
"test"
]
}

91
node_modules/is-array-buffer/CHANGELOG.md generated vendored Normal file
View File

@@ -0,0 +1,91 @@
# 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).
## [v3.0.5](https://github.com/fengyuanchen/is-array-buffer/compare/v3.0.4...v3.0.5) - 2024-12-16
### Commits
- [types] use shared config [`6180b31`](https://github.com/fengyuanchen/is-array-buffer/commit/6180b3180cd15a49e6394cb6de0ae2667124d3f7)
- [actions] split out node 10-20, and 20+ [`1ea4712`](https://github.com/fengyuanchen/is-array-buffer/commit/1ea471223e393bfc124fdecdbeb23fe08209514f)
- [Dev Deps] update `@ljharb/eslint-config`, `@ljharb/tsconfig`, `@types/get-intrinsic`, `@types/object-inspect`, `@types/tape`, `auto-changelog`, `es-value-fixtures`, `object-inspect`, `tape` [`de2b6ab`](https://github.com/fengyuanchen/is-array-buffer/commit/de2b6aba5e88b382bd6707409aa39822707fed50)
- [Deps] update `call-bind`, `get-intrinsic` [`55b80a1`](https://github.com/fengyuanchen/is-array-buffer/commit/55b80a10ae9151e1bd52382610d7330f37a1dc05)
- [Deps] update `call-bind`, `get-intrinsic` [`184484a`](https://github.com/fengyuanchen/is-array-buffer/commit/184484ad7fd3a72426f78e2bce3246e8c23e9ccf)
- [Dev Deps] update `available-typed-arrays`, `tape` [`81582a7`](https://github.com/fengyuanchen/is-array-buffer/commit/81582a72d6ddb28f67ad542edcd673d6c01cc2c0)
- [Tests] add `@arethetypeswrong/cli` [`6d67841`](https://github.com/fengyuanchen/is-array-buffer/commit/6d6784170ec8a0b766428ce44be3157147860a09)
- [Refactor] use `call-bound` directly [`dd0bad1`](https://github.com/fengyuanchen/is-array-buffer/commit/dd0bad194e4ff0e5413be23d69018fa961ce4af7)
- [Tests] replace `aud` with `npm audit` [`99b62d1`](https://github.com/fengyuanchen/is-array-buffer/commit/99b62d1755b6965bbc236342215e28a10d6839a7)
- [Dev Deps] remove obsolete DT package [`9fc6971`](https://github.com/fengyuanchen/is-array-buffer/commit/9fc69715867796c5854fd5377d90da6f01fb981e)
- [Dev Deps] add missing peer dep [`a3b8dbb`](https://github.com/fengyuanchen/is-array-buffer/commit/a3b8dbb538c13abb8f1a4d4d9a682ec71c2f52f8)
## [v3.0.4](https://github.com/fengyuanchen/is-array-buffer/compare/v3.0.3...v3.0.4) - 2024-02-02
### Commits
- [patch] add types [`15fab4c`](https://github.com/fengyuanchen/is-array-buffer/commit/15fab4c68378904a12592969042e638dbc6be8e5)
## [v3.0.3](https://github.com/fengyuanchen/is-array-buffer/compare/v3.0.2...v3.0.3) - 2024-02-02
### Commits
- [Fix] TAs can take a DataView in node 0.8; use a simpler check [`69a03f6`](https://github.com/fengyuanchen/is-array-buffer/commit/69a03f671f892b724be1a899a3d90c981e7601c9)
- [Dev Deps] update `aud`, `available-typed-arrays`, `npmignore`, `object-inspect`, `tape` [`53ca341`](https://github.com/fengyuanchen/is-array-buffer/commit/53ca34182d2aab61e90e744ee47d01f6577b616e)
- [Deps] update `call-bind`, `get-intrinsic`, `is-typed-array` [`bec883f`](https://github.com/fengyuanchen/is-array-buffer/commit/bec883f31e83410a46927a843ded46ebffbbb1f6)
- [Dev Deps] update `@ljharb/eslint-config`, `aud`, `tape` [`944d4ce`](https://github.com/fengyuanchen/is-array-buffer/commit/944d4cea229ce29a0965665bf59df290c53ecbbb)
- [meta] add missing `engines.node` [`0852be6`](https://github.com/fengyuanchen/is-array-buffer/commit/0852be6f64188912d2383ff9b6a7cc12bd369006)
- [Deps] update `get-intrinsic` [`b59c4af`](https://github.com/fengyuanchen/is-array-buffer/commit/b59c4af432014649d6cd1f070cf6e9917e6ad524)
## [v3.0.2](https://github.com/fengyuanchen/is-array-buffer/compare/v3.0.1...v3.0.2) - 2023-03-01
### Commits
- [Fix] `node` 0.8: an object arg to a TA only throws a RangeError when it is an ArrayBuffer of an incompatible byte length [`d5108f6`](https://github.com/fengyuanchen/is-array-buffer/commit/d5108f6d06245e616b6c563995f214a38732243c)
- [Dev Deps] update `object-inspect`, `tape` [`400f456`](https://github.com/fengyuanchen/is-array-buffer/commit/400f4563ccbe27c7fbb485665352c76210bba9cb)
- [Deps] update `get-intrinsic` [`133732e`](https://github.com/fengyuanchen/is-array-buffer/commit/133732ec88f8dded1c705b758badc2240077a6d8)
## [v3.0.1](https://github.com/fengyuanchen/is-array-buffer/compare/v3.0.0...v3.0.1) - 2023-01-05
### Commits
- [Fix] in node 0.8, TAs do not coerce Uint8Arrays to an ArrayBuffer properly [`e488763`](https://github.com/fengyuanchen/is-array-buffer/commit/e48876346f446825dad619e55dcc830ed93f2853)
- [Dev Deps] update `@ljharb/eslint-config`, `aud` [`8eebfa2`](https://github.com/fengyuanchen/is-array-buffer/commit/8eebfa21881f3a9fa5094f8c486f00e496658ea9)
## [v3.0.0](https://github.com/fengyuanchen/is-array-buffer/compare/v2.0.0...v3.0.0) - 2023-01-04
### Commits
- [Breaking] replace package implementation [`b65f929`](https://github.com/fengyuanchen/is-array-buffer/commit/b65f929d856d2a42f043be0f5a0fc2e067370ed1)
- Initial implementation, tests, readme [`06afa73`](https://github.com/fengyuanchen/is-array-buffer/commit/06afa73e775960802ea9257cc6b4cdf768c72d3f)
- Initial commit [`051813f`](https://github.com/fengyuanchen/is-array-buffer/commit/051813f15e3cbf515e2447306761dd9c42819150)
- npm init [`946d3de`](https://github.com/fengyuanchen/is-array-buffer/commit/946d3de82b15471fb2c00a4a2a5a52eb0515eb04)
- [meta] use `npmignore` to autogenerate an npmignore file [`ca4c446`](https://github.com/fengyuanchen/is-array-buffer/commit/ca4c446f37daf5ab8cc590f2194574c2706561ed)
- Only apps should have lockfiles [`be7d8eb`](https://github.com/fengyuanchen/is-array-buffer/commit/be7d8eb09dc5033c04df85d7ba9a8714f4e54357)
- docs: fix badge link [`9ea7fb6`](https://github.com/fengyuanchen/is-array-buffer/commit/9ea7fb638e79f8938161b3b7370cb965d8e93a8b)
<!-- auto-changelog-above -->
## 2.0.0 (Feb 12, 2021)
- Refactor in TypeScript.
- Drop the `dist` directory.
- Drop the UMD bundled file.
- Add a declaration file for TypeScript.
## 1.0.1 (Apr 1, 2018)
- Improve code style.
## 1.0.0 (Jul 25, 2017)
- Supports UMD, CommonJS and ES Module.
## 0.1.0 (Nov 28, 2015)
- Check if ArrayBuffer is defined first.
## 0.0.1 (Nov 11, 2015)
- Initial release.

21
node_modules/is-array-buffer/LICENSE generated vendored Normal file
View File

@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2015 Chen Gengyuan, Inspect JS
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.

56
node_modules/is-array-buffer/README.md generated vendored Normal file
View File

@@ -0,0 +1,56 @@
# is-array-buffer <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]
Is this value a JS ArrayBuffer? This module works cross-realm/iframe, does not depend on `instanceof` or mutable properties, and despite ES6 Symbol.toStringTag.
## Example
```js
var assert = require('assert');
var isArrayBuffer = require('is-array-buffer');
assert(!isArrayBuffer(function () {}));
assert(!isArrayBuffer(null));
assert(!isArrayBuffer(function* () { yield 42; return Infinity; });
assert(!isArrayBuffer(Symbol('foo')));
assert(!isArrayBuffer(1n));
assert(!isArrayBuffer(Object(1n)));
assert(!isArrayBuffer(new Set()));
assert(!isArrayBuffer(new WeakSet()));
assert(!isArrayBuffer(new Map()));
assert(!isArrayBuffer(new WeakMap()));
assert(!isArrayBuffer(new WeakRef({})));
assert(!isArrayBuffer(new FinalizationRegistry(() => {})));
assert(!isArrayBuffer(new SharedArrayBuffer()));
assert(isArrayBuffer(new ArrayBuffer()));
class MyArrayBuffer extends ArrayBuffer {}
assert(isArrayBuffer(new MyArrayBuffer()));
```
## Tests
Simply clone the repo, `npm install`, and run `npm test`
[package-url]: https://npmjs.org/package/is-array-buffer
[npm-version-svg]: https://versionbadg.es/inspect-js/is-array-buffer.svg
[deps-svg]: https://david-dm.org/inspect-js/is-array-buffer.svg
[deps-url]: https://david-dm.org/inspect-js/is-array-buffer
[dev-deps-svg]: https://david-dm.org/inspect-js/is-array-buffer/dev-status.svg
[dev-deps-url]: https://david-dm.org/inspect-js/is-array-buffer#info=devDependencies
[npm-badge-png]: https://nodei.co/npm/is-array-buffer.png?downloads=true&stars=true
[license-image]: https://img.shields.io/npm/l/is-array-buffer.svg
[license-url]: LICENSE
[downloads-image]: https://img.shields.io/npm/dm/is-array-buffer.svg
[downloads-url]: https://npm-stat.com/charts.html?package=is-array-buffer
[codecov-image]: https://codecov.io/gh/inspect-js/is-array-buffer/branch/main/graphs/badge.svg
[codecov-url]: https://app.codecov.io/gh/inspect-js/is-array-buffer/
[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/is-array-buffer
[actions-url]: https://github.com/inspect-js/is-array-buffer/actions

3
node_modules/is-array-buffer/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,3 @@
declare function isArrayBuffer(value: unknown): value is ArrayBuffer;
export = isArrayBuffer;

43
node_modules/is-array-buffer/index.js generated vendored Normal file
View File

@@ -0,0 +1,43 @@
'use strict';
var callBind = require('call-bind');
var callBound = require('call-bound');
var GetIntrinsic = require('get-intrinsic');
var $ArrayBuffer = GetIntrinsic('%ArrayBuffer%', true);
/** @type {undefined | ((receiver: ArrayBuffer) => number) | ((receiver: unknown) => never)} */
var $byteLength = callBound('ArrayBuffer.prototype.byteLength', true);
var $toString = callBound('Object.prototype.toString');
// in node 0.10, ArrayBuffers have no prototype methods, but have an own slot-checking `slice` method
var abSlice = !!$ArrayBuffer && !$byteLength && new $ArrayBuffer(0).slice;
var $abSlice = !!abSlice && callBind(abSlice);
/** @type {import('.')} */
module.exports = $byteLength || $abSlice
? function isArrayBuffer(obj) {
if (!obj || typeof obj !== 'object') {
return false;
}
try {
if ($byteLength) {
// @ts-expect-error no idea why TS can't handle the overload
$byteLength(obj);
} else {
// @ts-expect-error TS chooses not to type-narrow inside a closure
$abSlice(obj, 0);
}
return true;
} catch (e) {
return false;
}
}
: $ArrayBuffer
// in node 0.8, ArrayBuffers have no prototype or own methods, but also no Symbol.toStringTag
? function isArrayBuffer(obj) {
return $toString(obj) === '[object ArrayBuffer]';
}
// @ts-expect-error
: function isArrayBuffer(obj) { // eslint-disable-line no-unused-vars
return false;
};

91
node_modules/is-array-buffer/package.json generated vendored Normal file
View File

@@ -0,0 +1,91 @@
{
"name": "is-array-buffer",
"version": "3.0.5",
"description": "Is this value a JS ArrayBuffer?",
"main": "index.js",
"exports": {
".": "./index.js",
"./package.json": "./package.json"
},
"types": "./index.d.ts",
"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": "tsc && attw -P",
"pretest": "npm run lint",
"tests-only": "nyc tape 'test/**/*.js'",
"test": "npm run tests-only --",
"posttest": "npx npm@'>= 10.2' audit --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/inspect-js/is-array-buffer.git"
},
"keywords": [
"javascript",
"ecmascript",
"is",
"arraybuffer",
"array",
"buffer"
],
"author": "Jordan Harband <ljharb@gmail.com>",
"funding": {
"url": "https://github.com/sponsors/ljharb"
},
"license": "MIT",
"bugs": {
"url": "https://github.com/inspect-js/is-array-buffer/issues"
},
"homepage": "https://github.com/inspect-js/is-array-buffer#readme",
"devDependencies": {
"@arethetypeswrong/cli": "^0.17.1",
"@ljharb/eslint-config": "^21.1.1",
"@ljharb/tsconfig": "^0.2.2",
"@types/call-bind": "^1.0.5",
"@types/for-each": "^0.3.3",
"@types/get-intrinsic": "^1.2.3",
"@types/object-inspect": "^1.13.0",
"@types/tape": "^5.7.0",
"auto-changelog": "^2.5.0",
"available-typed-arrays": "^1.0.7",
"encoding": "^0.1.13",
"es-value-fixtures": "^1.5.0",
"eslint": "=8.8.0",
"for-each": "^0.3.3",
"in-publish": "^2.0.1",
"npmignore": "^0.3.1",
"nyc": "^10.3.2",
"object-inspect": "^1.13.3",
"safe-publish-latest": "^2.0.0",
"tape": "^5.9.0",
"typescript": "next"
},
"auto-changelog": {
"output": "CHANGELOG.md",
"template": "keepachangelog",
"unreleased": false,
"commitLimit": false,
"backfillLimit": false,
"hideCredit": true,
"startingVersion": "2.0.1"
},
"dependencies": {
"call-bind": "^1.0.8",
"call-bound": "^1.0.3",
"get-intrinsic": "^1.2.6"
},
"publishConfig": {
"ignore": [
".github/workflows"
]
},
"engines": {
"node": ">= 0.4"
}
}

49
node_modules/is-array-buffer/test/index.js generated vendored Normal file
View File

@@ -0,0 +1,49 @@
'use strict';
var test = require('tape');
var inspect = require('object-inspect');
var forEach = require('for-each');
var v = require('es-value-fixtures');
var availableTypedArrays = require('available-typed-arrays')();
var isArrayBuffer = require('..');
test('isArrayBuffer', function (t) {
t.equal(typeof isArrayBuffer, 'function', 'is a function');
/** @type {unknown[]} */
var nonABs = [].concat(
// @ts-expect-error TS sucks with [].concat
v.primitives,
v.objects,
typeof SharedArrayBuffer === 'function' ? new SharedArrayBuffer(0) : []
);
forEach(nonABs, function (nonAB) {
t.equal(isArrayBuffer(nonAB), false, inspect(nonAB) + ' is not an ArrayBuffer');
});
t.test('actual ArrayBuffer instances', { skip: typeof ArrayBuffer === 'undefined' }, function (st) {
var ab = new ArrayBuffer();
st.equal(isArrayBuffer(ab), true, inspect(ab) + ' is an ArrayBuffer');
var ab42 = new ArrayBuffer(42);
st.equal(isArrayBuffer(ab42), true, inspect(ab42) + ' is an ArrayBuffer');
var dv = new DataView(ab42);
st.equal(isArrayBuffer(dv), false, inspect(dv) + ' is not an ArrayBuffer');
st.end();
});
t.test('Typed Arrays', { skip: availableTypedArrays.length === 0 }, function (st) {
forEach(availableTypedArrays, function (TypedArray) {
var ta = new global[TypedArray](0);
st.equal(isArrayBuffer(ta.buffer), true, inspect(ta.buffer) + ', the TA\'s buffer, is an ArrayBuffer');
st.equal(isArrayBuffer(ta), false, inspect(ta) + ' is not an ArrayBuffer');
});
st.end();
});
t.end();
});

9
node_modules/is-array-buffer/tsconfig.json generated vendored Normal file
View File

@@ -0,0 +1,9 @@
{
"extends": "@ljharb/tsconfig",
"compilerOptions": {
"target": "ES2021",
},
"exclude": [
"coverage",
],
}