Initial commit
This commit is contained in:
9
node_modules/array-buffer-byte-length/.eslintrc
generated
vendored
Normal file
9
node_modules/array-buffer-byte-length/.eslintrc
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"root": true,
|
||||
|
||||
"extends": "@ljharb",
|
||||
|
||||
"globals": {
|
||||
"DataView": false,
|
||||
},
|
||||
}
|
12
node_modules/array-buffer-byte-length/.github/FUNDING.yml
generated
vendored
Normal file
12
node_modules/array-buffer-byte-length/.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/array-buffer-byte-length
|
||||
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']
|
13
node_modules/array-buffer-byte-length/.nycrc
generated
vendored
Normal file
13
node_modules/array-buffer-byte-length/.nycrc
generated
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"all": true,
|
||||
"check-coverage": false,
|
||||
"reporter": ["text-summary", "text", "html", "json"],
|
||||
"lines": 86,
|
||||
"statements": 85.93,
|
||||
"functions": 82.43,
|
||||
"branches": 76.06,
|
||||
"exclude": [
|
||||
"coverage",
|
||||
"test"
|
||||
]
|
||||
}
|
27
node_modules/array-buffer-byte-length/CHANGELOG.md
generated
vendored
Normal file
27
node_modules/array-buffer-byte-length/CHANGELOG.md
generated
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
# 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/inspect-js/array-buffer-byte-length/compare/v1.0.0...v1.0.1) - 2024-02-03
|
||||
|
||||
### Commits
|
||||
|
||||
- [patch] add types [`598d446`](https://github.com/inspect-js/array-buffer-byte-length/commit/598d446f45c8f4246493b2a1fa2b32cd0c669602)
|
||||
- [Dev Deps] update `@ljharb/eslint-config`, `aud`, `npmignore`, `object-inspect`, `tape` [`2572345`](https://github.com/inspect-js/array-buffer-byte-length/commit/257234593f576a7cbb1dce1b21d52abeb68db34d)
|
||||
- [Tests] add coverage [`d27357d`](https://github.com/inspect-js/array-buffer-byte-length/commit/d27357de558c3272341e252c3acc010d38edeb0f)
|
||||
- [Deps] update `call-bind`, `is-array-buffer` [`2ea13ad`](https://github.com/inspect-js/array-buffer-byte-length/commit/2ea13adc85b7d775d1649ac8e9469ac380cb3665)
|
||||
- [meta] add missing `engines.node` [`380e96d`](https://github.com/inspect-js/array-buffer-byte-length/commit/380e96d1c91dd579df0261950b46b62d4fed7a23)
|
||||
- [Deps] update `is-array-buffer` [`cfa7093`](https://github.com/inspect-js/array-buffer-byte-length/commit/cfa7093daaeeccbaa5228a22e6ec32a307d81549)
|
||||
- [meta] add `sideEffects` flag [`7297ddd`](https://github.com/inspect-js/array-buffer-byte-length/commit/7297dddd40a8f310bb69726a7a6edfae6111b8de)
|
||||
|
||||
## v1.0.0 - 2023-02-28
|
||||
|
||||
### Commits
|
||||
|
||||
- Initial implementation, tests, readme [`2db6cad`](https://github.com/inspect-js/array-buffer-byte-length/commit/2db6cad79270ab1966f5ea80160abbcd4534c91d)
|
||||
- Initial commit [`b2a0c9c`](https://github.com/inspect-js/array-buffer-byte-length/commit/b2a0c9c2246514b7999d331aad868c4f32326db7)
|
||||
- npm init [`376acdb`](https://github.com/inspect-js/array-buffer-byte-length/commit/376acdbd4435cb1d4c31d107cacb3b86f2363aee)
|
||||
- Only apps should have lockfiles [`70cf325`](https://github.com/inspect-js/array-buffer-byte-length/commit/70cf32526fc727d0d16a12d85a4bddea70075e31)
|
21
node_modules/array-buffer-byte-length/LICENSE
generated
vendored
Normal file
21
node_modules/array-buffer-byte-length/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2023 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.
|
40
node_modules/array-buffer-byte-length/README.md
generated
vendored
Normal file
40
node_modules/array-buffer-byte-length/README.md
generated
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
# array-buffer-byte-length <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]
|
||||
|
||||
Get the byte length of an ArrayBuffer, even in engines without a `.byteLength` method.
|
||||
|
||||
## Example
|
||||
|
||||
```js
|
||||
const assert = require('assert');
|
||||
const byteLength = require('array-buffer-byte-length');
|
||||
|
||||
assert.equal(byteLength([]), NaN, 'an array is not an ArrayBuffer, yields NaN');
|
||||
|
||||
assert.equal(byteLength(new ArrayBuffer(0)), 0, 'ArrayBuffer of byteLength 0, yields 0');
|
||||
```
|
||||
|
||||
## Tests
|
||||
Simply clone the repo, `npm install`, and run `npm test`
|
||||
|
||||
[package-url]: https://npmjs.org/package/array-buffer-byte-length
|
||||
[npm-version-svg]: https://versionbadg.es/inspect-js/array-buffer-byte-length.svg
|
||||
[deps-svg]: https://david-dm.org/inspect-js/array-buffer-byte-length.svg
|
||||
[deps-url]: https://david-dm.org/inspect-js/array-buffer-byte-length
|
||||
[dev-deps-svg]: https://david-dm.org/inspect-js/array-buffer-byte-length/dev-status.svg
|
||||
[dev-deps-url]: https://david-dm.org/inspect-js/array-buffer-byte-length#info=devDependencies
|
||||
[npm-badge-png]: https://nodei.co/npm/array-buffer-byte-length.png?downloads=true&stars=true
|
||||
[license-image]: https://img.shields.io/npm/l/array-buffer-byte-length.svg
|
||||
[license-url]: LICENSE
|
||||
[downloads-image]: https://img.shields.io/npm/dm/array-buffer-byte-length.svg
|
||||
[downloads-url]: https://npm-stat.com/charts.html?package=array-buffer-byte-length
|
||||
[codecov-image]: https://codecov.io/gh/inspect-js/array-buffer-byte-length/branch/main/graphs/badge.svg
|
||||
[codecov-url]: https://app.codecov.io/gh/inspect-js/array-buffer-byte-length/
|
||||
[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/array-buffer-byte-length
|
||||
[actions-url]: https://github.com/inspect-js/array-buffer-byte-length/actions
|
4
node_modules/array-buffer-byte-length/index.d.ts
generated
vendored
Normal file
4
node_modules/array-buffer-byte-length/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
declare function arrayBufferByteLength(buffer: ArrayBuffer): number;
|
||||
declare function arrayBufferByteLength(buffer: unknown): typeof NaN;
|
||||
|
||||
export = arrayBufferByteLength;
|
14
node_modules/array-buffer-byte-length/index.js
generated
vendored
Normal file
14
node_modules/array-buffer-byte-length/index.js
generated
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
'use strict';
|
||||
|
||||
var callBound = require('call-bind/callBound');
|
||||
var $byteLength = callBound('ArrayBuffer.prototype.byteLength', true);
|
||||
|
||||
var isArrayBuffer = require('is-array-buffer');
|
||||
|
||||
/** @type {import('.')} */
|
||||
module.exports = function byteLength(ab) {
|
||||
if (!isArrayBuffer(ab)) {
|
||||
return NaN;
|
||||
}
|
||||
return $byteLength ? $byteLength(ab) : ab.byteLength;
|
||||
}; // in node < 0.11, byteLength is an own nonconfigurable property
|
93
node_modules/array-buffer-byte-length/package.json
generated
vendored
Normal file
93
node_modules/array-buffer-byte-length/package.json
generated
vendored
Normal file
@@ -0,0 +1,93 @@
|
||||
{
|
||||
"name": "array-buffer-byte-length",
|
||||
"version": "1.0.1",
|
||||
"description": "Get the byte length of an ArrayBuffer, even in engines without a `.byteLength` method.",
|
||||
"main": "index.js",
|
||||
"exports": {
|
||||
".": "./index.js",
|
||||
"./package.json": "./package.json"
|
||||
},
|
||||
"sideEffects": false,
|
||||
"types": "./index.d.ts",
|
||||
"scripts": {
|
||||
"prepack": "npmignore --auto --commentLines=autogenerated",
|
||||
"prepublishOnly": "safe-publish-latest",
|
||||
"prepublish": "not-in-publish || npm run prepublishOnly",
|
||||
"pretest": "npm run lint",
|
||||
"prelint": "evalmd README.md",
|
||||
"lint": "eslint --ext=js,mjs .",
|
||||
"postlint": "tsc -p .",
|
||||
"tests-only": "nyc 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)\")\""
|
||||
},
|
||||
"keywords": [
|
||||
"shim",
|
||||
"polyfill",
|
||||
"ArrayBuffer",
|
||||
"byteLength",
|
||||
"byte",
|
||||
"length",
|
||||
"es-shim API",
|
||||
"es-shims"
|
||||
],
|
||||
"author": "Jordan Harband <ljharb@gmail.com>",
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
},
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/inspect-js/array-buffer-byte-length.git"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/inspect-js/array-buffer-byte-length/issues"
|
||||
},
|
||||
"homepage": "https://github.com/inspect-js/array-buffer-byte-length#readme",
|
||||
"dependencies": {
|
||||
"call-bind": "^1.0.5",
|
||||
"is-array-buffer": "^3.0.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@ljharb/eslint-config": "^21.1.0",
|
||||
"@types/call-bind": "^1.0.5",
|
||||
"@types/es-value-fixtures": "^1.4.4",
|
||||
"@types/for-each": "^0.3.3",
|
||||
"@types/object-inspect": "^1.8.4",
|
||||
"@types/tape": "^5.6.4",
|
||||
"aud": "^2.0.4",
|
||||
"auto-changelog": "^2.4.0",
|
||||
"es-value-fixtures": "^1.4.2",
|
||||
"eslint": "=8.8.0",
|
||||
"evalmd": "^0.0.19",
|
||||
"for-each": "^0.3.3",
|
||||
"in-publish": "^2.0.1",
|
||||
"npmignore": "^0.3.1",
|
||||
"nyc": "^10.3.2",
|
||||
"object-inspect": "^1.13.1",
|
||||
"safe-publish-latest": "^2.0.0",
|
||||
"tape": "^5.7.4",
|
||||
"typescript": "^5.4.0-dev.20240202"
|
||||
},
|
||||
"auto-changelog": {
|
||||
"output": "CHANGELOG.md",
|
||||
"template": "keepachangelog",
|
||||
"unreleased": false,
|
||||
"commitLimit": false,
|
||||
"backfillLimit": false,
|
||||
"hideCredit": true
|
||||
},
|
||||
"testling": {
|
||||
"files": "test/index.js"
|
||||
},
|
||||
"publishConfig": {
|
||||
"ignore": [
|
||||
".github/workflows"
|
||||
]
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
}
|
||||
}
|
29
node_modules/array-buffer-byte-length/test/index.js
generated
vendored
Normal file
29
node_modules/array-buffer-byte-length/test/index.js
generated
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
'use strict';
|
||||
|
||||
var test = require('tape');
|
||||
var forEach = require('for-each');
|
||||
var v = require('es-value-fixtures');
|
||||
var inspect = require('object-inspect');
|
||||
|
||||
var byteLength = require('../');
|
||||
|
||||
test('byteLength', function (t) {
|
||||
forEach(v.objects.concat(v.primitives), function (nonAB) {
|
||||
t.equal(byteLength(nonAB), NaN, inspect(nonAB) + ' is not an ArrayBuffer, and yields NaN');
|
||||
});
|
||||
|
||||
t.test('ArrayBuffers', { skip: typeof ArrayBuffer !== 'function' }, function (st) {
|
||||
var ab32 = new ArrayBuffer(32);
|
||||
st.equal(byteLength(ab32), 32, 'works on an ArrayBuffer of length 32: ' + inspect(ab32));
|
||||
|
||||
var ab0 = new ArrayBuffer(0);
|
||||
st.equal(byteLength(ab0), 0, 'works on an ArrayBuffer of length 0: ' + inspect(ab0));
|
||||
|
||||
var dv = new DataView(ab32);
|
||||
st.equal(byteLength(dv), NaN, 'a DataView returns NaN');
|
||||
|
||||
st.end();
|
||||
});
|
||||
|
||||
t.end();
|
||||
});
|
49
node_modules/array-buffer-byte-length/tsconfig.json
generated
vendored
Normal file
49
node_modules/array-buffer-byte-length/tsconfig.json
generated
vendored
Normal file
@@ -0,0 +1,49 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
/* Visit https://aka.ms/tsconfig to read more about this file */
|
||||
|
||||
/* Projects */
|
||||
|
||||
/* Language and Environment */
|
||||
"target": "ESNext", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */
|
||||
// "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */
|
||||
// "noLib": true, /* Disable including any library files, including the default lib.d.ts. */
|
||||
"useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */
|
||||
// "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */
|
||||
|
||||
/* Modules */
|
||||
"module": "commonjs", /* Specify what module code is generated. */
|
||||
// "rootDir": "./", /* Specify the root folder within your source files. */
|
||||
// "moduleResolution": "node10", /* Specify how TypeScript looks up a file from a given module specifier. */
|
||||
// "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
|
||||
// "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */
|
||||
// "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */
|
||||
"typeRoots": ["types"], /* Specify multiple folders that act like './node_modules/@types'. */
|
||||
"resolveJsonModule": true, /* Enable importing .json files. */
|
||||
// "allowArbitraryExtensions": true, /* Enable importing files with any extension, provided a declaration file is present. */
|
||||
|
||||
/* JavaScript Support */
|
||||
"allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */
|
||||
"checkJs": true, /* Enable error reporting in type-checked JavaScript files. */
|
||||
"maxNodeModuleJsDepth": 0, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */
|
||||
|
||||
/* Emit */
|
||||
"declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */
|
||||
"declarationMap": true, /* Create sourcemaps for d.ts files. */
|
||||
"noEmit": true, /* Disable emitting files from a compilation. */
|
||||
|
||||
/* Interop Constraints */
|
||||
"allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */
|
||||
"esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */
|
||||
"forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */
|
||||
|
||||
/* Type Checking */
|
||||
"strict": true, /* Enable all strict type-checking options. */
|
||||
|
||||
/* Completeness */
|
||||
//"skipLibCheck": true /* Skip type checking all .d.ts files. */
|
||||
},
|
||||
"exclude": [
|
||||
"coverage"
|
||||
]
|
||||
}
|
Reference in New Issue
Block a user