diff options
Diffstat (limited to 'desktop/node_modules/buffer-equal')
-rw-r--r-- | desktop/node_modules/buffer-equal/.eslintrc | 19 | ||||
-rw-r--r-- | desktop/node_modules/buffer-equal/.github/FUNDING.yml | 12 | ||||
-rw-r--r-- | desktop/node_modules/buffer-equal/CHANGELOG.md | 49 | ||||
-rw-r--r-- | desktop/node_modules/buffer-equal/LICENSE | 18 | ||||
-rw-r--r-- | desktop/node_modules/buffer-equal/README.md | 78 | ||||
-rw-r--r-- | desktop/node_modules/buffer-equal/example/eq.js | 16 | ||||
-rw-r--r-- | desktop/node_modules/buffer-equal/index.js | 23 | ||||
-rw-r--r-- | desktop/node_modules/buffer-equal/package.json | 65 | ||||
-rw-r--r-- | desktop/node_modules/buffer-equal/test/eq.js | 37 |
9 files changed, 317 insertions, 0 deletions
diff --git a/desktop/node_modules/buffer-equal/.eslintrc b/desktop/node_modules/buffer-equal/.eslintrc new file mode 100644 index 0000000..cc138fc --- /dev/null +++ b/desktop/node_modules/buffer-equal/.eslintrc @@ -0,0 +1,19 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "array-bracket-newline": 0, + }, + + "overrides": [ + { + "files": "example/**", + "rules": { + "no-buffer-constructor": 0, + "no-console": 0, + }, + }, + ], +} diff --git a/desktop/node_modules/buffer-equal/.github/FUNDING.yml b/desktop/node_modules/buffer-equal/.github/FUNDING.yml new file mode 100644 index 0000000..22d0ab8 --- /dev/null +++ b/desktop/node_modules/buffer-equal/.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/buffer-equal +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/buffer-equal/CHANGELOG.md b/desktop/node_modules/buffer-equal/CHANGELOG.md new file mode 100644 index 0000000..beec79b --- /dev/null +++ b/desktop/node_modules/buffer-equal/CHANGELOG.md @@ -0,0 +1,49 @@ +# 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/buffer-equal/compare/v1.0.0...v1.0.1) - 2022-10-12 + +### Commits + +- [eslint] fix indentation and whitespace [`94b97cd`](https://github.com/inspect-js/buffer-equal/commit/94b97cd8d3970fc8bd7d2eda3c074ccf7ee01659) +- [readme] rename, add badges [`c08b77f`](https://github.com/inspect-js/buffer-equal/commit/c08b77f67e02432cdc60fd8424661ec92251f3cf) +- [actions] add reusable workflows [`ea6a13d`](https://github.com/inspect-js/buffer-equal/commit/ea6a13ddf4e8dbd6c698787412540d4bd11a53c7) +- [Tests] switch from `tap` to `tape` [`d4681ac`](https://github.com/inspect-js/buffer-equal/commit/d4681aca8a5909467862e6ae0b2c91a6f27ba458) +- [meta] add `auto-changelog` [`50bd71a`](https://github.com/inspect-js/buffer-equal/commit/50bd71a3546e2e13f3c9af81b5f0c462efa897f1) +- [eslint] add eslint [`084e09e`](https://github.com/inspect-js/buffer-equal/commit/084e09ed8751d0e390ffb7937508b1aed448f897) +- [meta] create FUNDING.yml; add `funding` in package.json [`76b3e31`](https://github.com/inspect-js/buffer-equal/commit/76b3e317e16fad8f06e2bf727246028e7c2eb170) +- [meta] use `npmignore` to autogenerate an npmignore file [`514a3b7`](https://github.com/inspect-js/buffer-equal/commit/514a3b7e39b4eaf229b0d078ec05f156ae372a5f) +- Only apps should have lockfiles [`6e6963b`](https://github.com/inspect-js/buffer-equal/commit/6e6963baab8480210151e6216891bb9f6d880e76) +- [meta] update URLs [`0973f5a`](https://github.com/inspect-js/buffer-equal/commit/0973f5a9a3675476adaaecef634c6f5ac46080c1) +- [meta] add `safe-publish-latest` [`db19aab`](https://github.com/inspect-js/buffer-equal/commit/db19aabd4e38b07b7c5716006d9259fa2ef47ab1) +- [Tests] add `aud` in `posttest` [`b108d28`](https://github.com/inspect-js/buffer-equal/commit/b108d2849332f6e99cefdfcdd1aaed423a19717e) + +## [v1.0.0](https://github.com/inspect-js/buffer-equal/compare/v0.0.2...v1.0.0) - 2016-01-01 + +## [v0.0.2](https://github.com/inspect-js/buffer-equal/compare/v0.0.1...v0.0.2) - 2016-01-01 + +### Commits + +- add license file [`a7326b2`](https://github.com/inspect-js/buffer-equal/commit/a7326b2a0b34b98ba0d4d63cb126357175244847) + +## [v0.0.1](https://github.com/inspect-js/buffer-equal/compare/v0.0.0...v0.0.1) - 2014-05-24 + +### Commits + +- update node versions on travis [`0c246a1`](https://github.com/inspect-js/buffer-equal/commit/0c246a19136b82311e2289d629387a5e121796ef) +- depend on an old tap version so that travis passes again since they don't have the latest npm [`daf11fc`](https://github.com/inspect-js/buffer-equal/commit/daf11fca167cf6931f9a6a8071e508fdf015e09a) +- fix require() [`63e755d`](https://github.com/inspect-js/buffer-equal/commit/63e755dde568e0663314803c477de69efeea96af) +- Use node 0.11+ buffer.equals when available [`e0131f8`](https://github.com/inspect-js/buffer-equal/commit/e0131f82eb2f0fa0d0fcb72963d83f75ddc338c1) + +## v0.0.0 - 2012-05-11 + +### Commits + +- readme test and example [`98c6019`](https://github.com/inspect-js/buffer-equal/commit/98c601934a06da2ef2085574ae7ff6da3eebe8ad) +- added a package.json [`a8fc6c9`](https://github.com/inspect-js/buffer-equal/commit/a8fc6c93dfa95931eeaf5f0f4f6a9295c626a4a0) +- working implementation [`ee448ef`](https://github.com/inspect-js/buffer-equal/commit/ee448efb8e3550fd234e78213b34bff59ae04055) +- using travis [`2205205`](https://github.com/inspect-js/buffer-equal/commit/2205205c07a121cfabed2f696133638ded5302fa) diff --git a/desktop/node_modules/buffer-equal/LICENSE b/desktop/node_modules/buffer-equal/LICENSE new file mode 100644 index 0000000..ee27ba4 --- /dev/null +++ b/desktop/node_modules/buffer-equal/LICENSE @@ -0,0 +1,18 @@ +This software is released under the MIT license: + +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/buffer-equal/README.md b/desktop/node_modules/buffer-equal/README.md new file mode 100644 index 0000000..d2dc766 --- /dev/null +++ b/desktop/node_modules/buffer-equal/README.md @@ -0,0 +1,78 @@ +# buffer-equal <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] + +Return whether two buffers are equal. + +## example + +``` js +var bufferEqual = require('buffer-equal'); + +console.dir(bufferEqual( + new Buffer([253,254,255]), + new Buffer([253,254,255]) +)); +console.dir(bufferEqual( + new Buffer('abc'), + new Buffer('abcd') +)); +console.dir(bufferEqual( + new Buffer('abc'), + 'abc' +)); +``` + +output: + +```js +true +false +undefined +``` + +## methods + +```js +var bufferEqual = require('buffer-equal'); +``` + +bufferEqual(a, b) +----------------- + +Return whether the two buffers `a` and `b` are equal. + +If `a` or `b` is not a buffer, return `undefined`. + +## install + +With [npm](http://npmjs.org) do: + +``` +npm install buffer-equal +``` + +## license + +MIT + +[package-url]: https://npmjs.org/package/buffer-equal +[npm-version-svg]: https://versionbadg.es/inspect-js/buffer-equal.svg +[deps-svg]: https://david-dm.org/inspect-js/buffer-equal.svg +[deps-url]: https://david-dm.org/inspect-js/buffer-equal +[dev-deps-svg]: https://david-dm.org/inspect-js/buffer-equal/dev-status.svg +[dev-deps-url]: https://david-dm.org/inspect-js/buffer-equal#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/buffer-equal.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/buffer-equal.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/buffer-equal.svg +[downloads-url]: https://npm-stat.com/charts.html?package=buffer-equal +[codecov-image]: https://codecov.io/gh/inspect-js/buffer-equal/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/inspect-js/buffer-equal/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/buffer-equal +[actions-url]: https://github.com/inspect-js/buffer-equal/actions diff --git a/desktop/node_modules/buffer-equal/example/eq.js b/desktop/node_modules/buffer-equal/example/eq.js new file mode 100644 index 0000000..e7d3d2b --- /dev/null +++ b/desktop/node_modules/buffer-equal/example/eq.js @@ -0,0 +1,16 @@ +'use strict'; + +var bufferEqual = require('../'); + +console.dir(bufferEqual( + new Buffer([253, 254, 255]), + new Buffer([253, 254, 255]) +)); +console.dir(bufferEqual( + new Buffer('abc'), + new Buffer('abcd') +)); +console.dir(bufferEqual( + new Buffer('abc'), + 'abc' +)); diff --git a/desktop/node_modules/buffer-equal/index.js b/desktop/node_modules/buffer-equal/index.js new file mode 100644 index 0000000..844a74e --- /dev/null +++ b/desktop/node_modules/buffer-equal/index.js @@ -0,0 +1,23 @@ +'use strict'; + +var Buffer = require('buffer').Buffer; // for use with browserify + +module.exports = function (a, b) { + if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) { + return undefined; + } + if (typeof a.equals === 'function') { + return a.equals(b); + } + if (a.length !== b.length) { + return false; + } + + for (var i = 0; i < a.length; i++) { + if (a[i] !== b[i]) { + return false; + } + } + + return true; +}; diff --git a/desktop/node_modules/buffer-equal/package.json b/desktop/node_modules/buffer-equal/package.json new file mode 100644 index 0000000..7bef977 --- /dev/null +++ b/desktop/node_modules/buffer-equal/package.json @@ -0,0 +1,65 @@ +{ + "name": "buffer-equal", + "description": "return whether two buffers are equal", + "version": "1.0.1", + "repository": { + "type": "git", + "url": "git://github.com/inspect-js/buffer-equal.git" + }, + "main": "index.js", + "keywords": [ + "buffer", + "equal" + ], + "directories": { + "example": "example", + "test": "test" + }, + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "prepublish": "not-in-publish || npm run prepublishOnly", + "prepublishOnly": "safe-publish-latest", + "lint": "eslint --ext=js,mjs .", + "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)\")\"" + }, + "devDependencies": { + "@ljharb/eslint-config": "^21.0.0", + "aud": "^2.0.1", + "auto-changelog": "^2.4.0", + "eslint": "=8.8.0", + "in-publish": "^2.0.1", + "npmignore": "^0.3.0", + "safe-publish-latest": "^2.0.0", + "tape": "^5.6.1" + }, + "engines": { + "node": ">=0.4" + }, + "license": "MIT", + "author": { + "name": "James Halliday", + "email": "mail@substack.net", + "url": "http://substack.net" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "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/buffer-equal/test/eq.js b/desktop/node_modules/buffer-equal/test/eq.js new file mode 100644 index 0000000..9322111 --- /dev/null +++ b/desktop/node_modules/buffer-equal/test/eq.js @@ -0,0 +1,37 @@ +'use strict'; + +var bufferEqual = require('../'); +var test = require('tape'); + +test('equal', function (t) { + var eq = bufferEqual( + new Buffer([253, 254, 255]), + new Buffer([253, 254, 255]) + ); + t.strictEqual(eq, true); + t.end(); +}); + +test('not equal', function (t) { + var eq = bufferEqual( + new Buffer('abc'), + new Buffer('abcd') + ); + t.strictEqual(eq, false); + t.end(); +}); + +test('not equal not buffer', function (t) { + var eq = bufferEqual( + new Buffer('abc'), + 'abc' + ); + t.strictEqual(eq, undefined); + t.end(); +}); + +test('equal not buffer', function (t) { + var eq = bufferEqual('abc', 'abc'); + t.strictEqual(eq, undefined); + t.end(); +}); |