jai shree ram
This commit is contained in:
5
node_modules/array-buffer-byte-length/.eslintrc
generated
vendored
Normal file
5
node_modules/array-buffer-byte-length/.eslintrc
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"root": true,
|
||||
|
||||
"extends": "@ljharb",
|
||||
}
|
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"
|
||||
]
|
||||
}
|
15
node_modules/array-buffer-byte-length/CHANGELOG.md
generated
vendored
Normal file
15
node_modules/array-buffer-byte-length/CHANGELOG.md
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
# 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.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
|
13
node_modules/array-buffer-byte-length/index.js
generated
vendored
Normal file
13
node_modules/array-buffer-byte-length/index.js
generated
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
'use strict';
|
||||
|
||||
var callBound = require('call-bind/callBound');
|
||||
var $byteLength = callBound('ArrayBuffer.prototype.byteLength', true);
|
||||
|
||||
var isArrayBuffer = require('is-array-buffer');
|
||||
|
||||
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
|
81
node_modules/array-buffer-byte-length/package.json
generated
vendored
Normal file
81
node_modules/array-buffer-byte-length/package.json
generated
vendored
Normal file
@@ -0,0 +1,81 @@
|
||||
{
|
||||
"name": "array-buffer-byte-length",
|
||||
"version": "1.0.0",
|
||||
"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"
|
||||
},
|
||||
"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 .",
|
||||
"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.2",
|
||||
"is-array-buffer": "^3.0.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@ljharb/eslint-config": "^21.0.1",
|
||||
"aud": "^2.0.2",
|
||||
"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.0",
|
||||
"nyc": "^10.3.2",
|
||||
"object-inspect": "^1.12.3",
|
||||
"safe-publish-latest": "^2.0.0",
|
||||
"tape": "^5.6.3"
|
||||
},
|
||||
"auto-changelog": {
|
||||
"output": "CHANGELOG.md",
|
||||
"template": "keepachangelog",
|
||||
"unreleased": false,
|
||||
"commitLimit": false,
|
||||
"backfillLimit": false,
|
||||
"hideCredit": true
|
||||
},
|
||||
"testling": {
|
||||
"files": "test/index.js"
|
||||
},
|
||||
"publishConfig": {
|
||||
"ignore": [
|
||||
".github/workflows"
|
||||
]
|
||||
}
|
||||
}
|
26
node_modules/array-buffer-byte-length/test/index.js
generated
vendored
Normal file
26
node_modules/array-buffer-byte-length/test/index.js
generated
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
'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));
|
||||
|
||||
st.end();
|
||||
});
|
||||
|
||||
t.end();
|
||||
});
|
Reference in New Issue
Block a user