forked from Vyacheslav/internet-programming
fix
This commit is contained in:
20
lab3/node_modules/set-function-name/.eslintrc
generated
vendored
Normal file
20
lab3/node_modules/set-function-name/.eslintrc
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"root": true,
|
||||
|
||||
"extends": "@ljharb",
|
||||
|
||||
"rules": {
|
||||
"id-length": "off",
|
||||
},
|
||||
|
||||
"overrides": [
|
||||
{
|
||||
"files": ["test/**/*.js"],
|
||||
"rules": {
|
||||
"id-length": "off",
|
||||
"multiline-comment-style": "off",
|
||||
"no-empty-function": "off",
|
||||
},
|
||||
},
|
||||
],
|
||||
}
|
||||
12
lab3/node_modules/set-function-name/.github/FUNDING.yml
generated
vendored
Normal file
12
lab3/node_modules/set-function-name/.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/set-function-name
|
||||
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 a single custom sponsorship URL
|
||||
39
lab3/node_modules/set-function-name/CHANGELOG.md
generated
vendored
Normal file
39
lab3/node_modules/set-function-name/CHANGELOG.md
generated
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
# 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).
|
||||
|
||||
## [v2.0.1](https://github.com/jfsiii/set-function-name/compare/v2.0.0...v2.0.1) - 2023-09-13
|
||||
|
||||
### Commits
|
||||
|
||||
- [Fix] move `functions-have-names` to runtime deps [`db2eda8`](https://github.com/jfsiii/set-function-name/commit/db2eda8da4c8aecfad01739000bbd63d04a8e8cf)
|
||||
|
||||
## [v2.0.0](https://github.com/jfsiii/set-function-name/compare/v1.0.0...v2.0.0) - 2023-09-12
|
||||
|
||||
### Commits
|
||||
|
||||
- [eslint] add `npm run lint` [`23e1fcd`](https://github.com/jfsiii/set-function-name/commit/23e1fcd85b64b864cb8f7e894da78d540e72923a)
|
||||
- [actions] add reused GHA [`525127e`](https://github.com/jfsiii/set-function-name/commit/525127e08bdb35b0d44f565492456c7d1d5923fc)
|
||||
- [meta] add `.gitignore` [`aa3abdf`](https://github.com/jfsiii/set-function-name/commit/aa3abdfa6af18adf70281352905dd69ef8b2c66f)
|
||||
- [Tests] switch tests to use tape; add posttest [`8ad6d30`](https://github.com/jfsiii/set-function-name/commit/8ad6d30c61f78d2f9beec156ba7f1c4c3741c593)
|
||||
- [readme] add readme [`732c46c`](https://github.com/jfsiii/set-function-name/commit/732c46c05e0fa6843dbc85b3af1e9c9bf22e7bf9)
|
||||
- [New] add optional `loose` argument [`f5e4771`](https://github.com/jfsiii/set-function-name/commit/f5e4771266c95567d87f6dc2cff94c986bc7e074)
|
||||
- [meta] relicense package to MIT; fix repo URLs [`13948f8`](https://github.com/jfsiii/set-function-name/commit/13948f8bb4ec8a25b67332d8de232ad0c0dc4e6d)
|
||||
- [meta] add `auto-changelog` [`7ab201c`](https://github.com/jfsiii/set-function-name/commit/7ab201c0d83d464664cc4588acad0d0f75926679)
|
||||
- [Breaking] throw if a non-function is provided [`cf6fc8f`](https://github.com/jfsiii/set-function-name/commit/cf6fc8f3396d58aa8c32a83375cbf57d933d7e79)
|
||||
- [Breaking] drop UMD, just use CJS [`47abfe8`](https://github.com/jfsiii/set-function-name/commit/47abfe89abfaa72f71e0a77a52a5ff2b7377e11a)
|
||||
- [Refactor] use `define-data-property` and `has-property-descriptors` [`9921c2b`](https://github.com/jfsiii/set-function-name/commit/9921c2b64c571255084aefaa02660314609e8ea0)
|
||||
- [meta] use `npmignore` to autogenerate an npmignore file [`c5dbe4f`](https://github.com/jfsiii/set-function-name/commit/c5dbe4f4c44298596338432e2ac9946a10c98edd)
|
||||
- Only apps should have lockfiles [`98bbfa1`](https://github.com/jfsiii/set-function-name/commit/98bbfa145387f318152a6b792bd69aca3c544813)
|
||||
- [meta] add `safe-publish-latest` [`8916cd8`](https://github.com/jfsiii/set-function-name/commit/8916cd8f5549dceee31f06d35a76e2f9d4933a8b)
|
||||
- [meta] add `engines` [`2427c8e`](https://github.com/jfsiii/set-function-name/commit/2427c8e2499f378c9ff3d92c7d544c771ca810df)
|
||||
|
||||
## v1.0.0 - 2017-09-14
|
||||
|
||||
### Commits
|
||||
|
||||
- Initial commit. Including tests. [`f26a1f2`](https://github.com/jfsiii/set-function-name/commit/f26a1f2c69a70dad5049b1daa08eae5f6acd9a1e)
|
||||
- add .npmignore to ignore test directory [`9cac96f`](https://github.com/jfsiii/set-function-name/commit/9cac96fd9e98f25883be6e727ac32356522a5d69)
|
||||
21
lab3/node_modules/set-function-name/LICENSE
generated
vendored
Normal file
21
lab3/node_modules/set-function-name/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) Jordan Harband and contributors
|
||||
|
||||
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.
|
||||
61
lab3/node_modules/set-function-name/README.md
generated
vendored
Normal file
61
lab3/node_modules/set-function-name/README.md
generated
vendored
Normal file
@@ -0,0 +1,61 @@
|
||||
# set-function-name <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]
|
||||
|
||||
Set a function’s name.
|
||||
|
||||
Arguments:
|
||||
- `fn`: the function
|
||||
- `name`: the new name
|
||||
- `loose`: Optional. If true, and the name fails to be set, do not throw. Default false.
|
||||
|
||||
Returns `fn`.
|
||||
|
||||
## Usage
|
||||
|
||||
```javascript
|
||||
var setFunctionName = require('set-function-name');
|
||||
var assert = require('assert');
|
||||
|
||||
const obj = {
|
||||
concise() {},
|
||||
arrow: () => {},
|
||||
named: function named() {},
|
||||
anon: function () {},
|
||||
};
|
||||
assert.equal(obj.concise.name, 'concise');
|
||||
assert.equal(obj.arrow.name, 'arrow');
|
||||
assert.equal(obj.named.name, 'named');
|
||||
assert.equal(obj.anon.name, 'anon');
|
||||
|
||||
assert.equal(setFunctionName(obj.concise, 'brief'), obj.concise);
|
||||
assert.equal(setFunctionName(obj.arrow, 'pointy'), obj.arrow);
|
||||
assert.equal(setFunctionName(obj.named, ''), obj.named);
|
||||
assert.equal(setFunctionName(obj.anon, 'anonymous'), obj.anon);
|
||||
|
||||
assert.equal(obj.concise.name, 'brief');
|
||||
assert.equal(obj.arrow.name, 'pointy');
|
||||
assert.equal(obj.named.name, '');
|
||||
assert.equal(obj.anon.name, 'anonymous');
|
||||
```
|
||||
|
||||
[package-url]: https://npmjs.org/package/set-function-name
|
||||
[npm-version-svg]: https://versionbadg.es/ljharb/set-function-name.svg
|
||||
[deps-svg]: https://david-dm.org/ljharb/set-function-name.svg
|
||||
[deps-url]: https://david-dm.org/ljharb/set-function-name
|
||||
[dev-deps-svg]: https://david-dm.org/ljharb/set-function-name/dev-status.svg
|
||||
[dev-deps-url]: https://david-dm.org/ljharb/set-function-name#info=devDependencies
|
||||
[npm-badge-png]: https://nodei.co/npm/set-function-name.png?downloads=true&stars=true
|
||||
[license-image]: https://img.shields.io/npm/l/set-function-name.svg
|
||||
[license-url]: LICENSE
|
||||
[downloads-image]: https://img.shields.io/npm/dm/set-function-name.svg
|
||||
[downloads-url]: https://npm-stat.com/charts.html?package=set-function-name
|
||||
[codecov-image]: https://codecov.io/gh/ljharb/set-function-name/branch/main/graphs/badge.svg
|
||||
[codecov-url]: https://app.codecov.io/gh/ljharb/set-function-name/
|
||||
[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/set-function-name
|
||||
[actions-url]: https://github.com/ljharb/set-function-name/actions
|
||||
22
lab3/node_modules/set-function-name/index.js
generated
vendored
Normal file
22
lab3/node_modules/set-function-name/index.js
generated
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
'use strict';
|
||||
|
||||
var define = require('define-data-property');
|
||||
var hasDescriptors = require('has-property-descriptors')();
|
||||
var functionsHaveConfigurableNames = require('functions-have-names').functionsHaveConfigurableNames();
|
||||
|
||||
var $TypeError = TypeError;
|
||||
|
||||
module.exports = function setFunctionName(fn, name) {
|
||||
if (typeof fn !== 'function') {
|
||||
throw new $TypeError('`fn` is not a function');
|
||||
}
|
||||
var loose = arguments.length > 2 && !!arguments[2];
|
||||
if (!loose || functionsHaveConfigurableNames) {
|
||||
if (hasDescriptors) {
|
||||
define(fn, 'name', name, true, true);
|
||||
} else {
|
||||
define(fn, 'name', name);
|
||||
}
|
||||
}
|
||||
return fn;
|
||||
};
|
||||
80
lab3/node_modules/set-function-name/package.json
generated
vendored
Normal file
80
lab3/node_modules/set-function-name/package.json
generated
vendored
Normal file
@@ -0,0 +1,80 @@
|
||||
{
|
||||
"name": "set-function-name",
|
||||
"version": "2.0.1",
|
||||
"description": "Set a function's name property",
|
||||
"main": "index.js",
|
||||
"directories": {
|
||||
"test": "test"
|
||||
},
|
||||
"scripts": {
|
||||
"prepack": "npmignore --auto --commentLines=autogenerated",
|
||||
"prepublish": "not-in-publish || npm run prepublishOnly",
|
||||
"prepublishOnly": "safe-publish-latest",
|
||||
"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/set-function-name.git"
|
||||
},
|
||||
"keywords": [
|
||||
"set",
|
||||
"assign",
|
||||
"function",
|
||||
"name",
|
||||
"function.name"
|
||||
],
|
||||
"author": "Jordan Harband <ljharb@gmail.com>",
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/ljharb/set-function-name/issues"
|
||||
},
|
||||
"homepage": "https://github.com/ljharb/set-function-name#readme",
|
||||
"devDependencies": {
|
||||
"@ljharb/eslint-config": "^21.1.0",
|
||||
"aud": "^2.0.3",
|
||||
"auto-changelog": "^2.4.0",
|
||||
"es-value-fixtures": "^1.4.2",
|
||||
"eslint": "=8.8.0",
|
||||
"evalmd": "^0.0.19",
|
||||
"for-each": "^0.3.3",
|
||||
"function.prototype.name": "^1.1.6",
|
||||
"in-publish": "^2.0.1",
|
||||
"make-arrow-function": "^1.2.0",
|
||||
"make-async-function": "^1.0.0",
|
||||
"make-async-generator-function": "^1.0.0",
|
||||
"make-generator-function": "^2.0.0",
|
||||
"npmignore": "^0.3.0",
|
||||
"object-inspect": "^1.12.3",
|
||||
"safe-publish-latest": "^2.0.0",
|
||||
"tape": "^5.6.6"
|
||||
},
|
||||
"dependencies": {
|
||||
"define-data-property": "^1.0.1",
|
||||
"functions-have-names": "^1.2.3",
|
||||
"has-property-descriptors": "^1.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
"auto-changelog": {
|
||||
"output": "CHANGELOG.md",
|
||||
"template": "keepachangelog",
|
||||
"unreleased": false,
|
||||
"commitLimit": false,
|
||||
"backfillLimit": false,
|
||||
"hideCredit": true
|
||||
},
|
||||
"publishConfig": {
|
||||
"ignore": [
|
||||
".github/workflows",
|
||||
"test"
|
||||
]
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user