node-red-contrib-tak-registration 0.9.0 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -0
- package/node_modules/@types/node/README.md +1 -1
- package/node_modules/@types/node/async_hooks.d.ts +2 -0
- package/node_modules/@types/node/fs.d.ts +12 -7
- package/node_modules/@types/node/http.d.ts +40 -8
- package/node_modules/@types/node/index.d.ts +1 -1
- package/node_modules/@types/node/inspector.d.ts +2 -2
- package/node_modules/@types/node/module.d.ts +29 -4
- package/node_modules/@types/node/package.json +2 -2
- package/node_modules/@types/node/process.d.ts +3 -2
- package/node_modules/@types/node/ts4.8/async_hooks.d.ts +2 -0
- package/node_modules/@types/node/ts4.8/fs.d.ts +12 -7
- package/node_modules/@types/node/ts4.8/http.d.ts +40 -8
- package/node_modules/@types/node/ts4.8/inspector.d.ts +2 -2
- package/node_modules/@types/node/ts4.8/module.d.ts +29 -4
- package/node_modules/@types/node/ts4.8/process.d.ts +3 -2
- package/node_modules/@types/node/ts4.8/worker_threads.d.ts +2 -1
- package/node_modules/@types/node/worker_threads.d.ts +2 -1
- package/node_modules/define-data-property/.eslintrc +24 -0
- package/node_modules/define-data-property/.github/FUNDING.yml +12 -0
- package/node_modules/define-data-property/.nycrc +13 -0
- package/node_modules/define-data-property/CHANGELOG.md +31 -0
- package/node_modules/define-data-property/LICENSE +21 -0
- package/node_modules/define-data-property/README.md +67 -0
- package/node_modules/define-data-property/index.d.ts +3 -0
- package/node_modules/define-data-property/index.d.ts.map +1 -0
- package/node_modules/define-data-property/index.js +60 -0
- package/node_modules/define-data-property/package.json +111 -0
- package/node_modules/define-data-property/test/index.js +397 -0
- package/node_modules/define-data-property/tsconfig.json +58 -0
- package/node_modules/define-data-property/tsinit +109 -0
- package/node_modules/define-properties/CHANGELOG.md +8 -0
- package/node_modules/define-properties/index.js +5 -11
- package/node_modules/define-properties/package.json +5 -4
- package/node_modules/gopd/.eslintrc +16 -0
- package/node_modules/gopd/.github/FUNDING.yml +12 -0
- package/node_modules/gopd/CHANGELOG.md +25 -0
- package/node_modules/gopd/LICENSE +21 -0
- package/node_modules/gopd/README.md +40 -0
- package/node_modules/gopd/index.js +16 -0
- package/node_modules/gopd/package.json +71 -0
- package/node_modules/gopd/test/index.js +35 -0
- package/node_modules/regexp.prototype.flags/.eslintrc +1 -0
- package/node_modules/regexp.prototype.flags/CHANGELOG.md +8 -0
- package/node_modules/regexp.prototype.flags/implementation.js +3 -6
- package/node_modules/regexp.prototype.flags/package.json +8 -7
- package/node_modules/set-function-name/.eslintrc +20 -0
- package/node_modules/set-function-name/.github/FUNDING.yml +12 -0
- package/node_modules/set-function-name/CHANGELOG.md +39 -0
- package/node_modules/set-function-name/LICENSE +21 -0
- package/node_modules/set-function-name/README.md +61 -0
- package/node_modules/set-function-name/index.js +22 -0
- package/node_modules/set-function-name/package.json +80 -0
- package/node_modules/uuid/CHANGELOG.md +6 -0
- package/node_modules/uuid/README.md +9 -5
- package/node_modules/uuid/dist/commonjs-browser/stringify.js +1 -1
- package/node_modules/uuid/dist/esm-browser/stringify.js +1 -1
- package/node_modules/uuid/dist/esm-node/stringify.js +1 -1
- package/node_modules/uuid/dist/stringify.js +1 -1
- package/node_modules/uuid/package.json +7 -3
- package/package.json +2 -2
- package/tak-registration.html +9 -2
- package/tak-registration.js +93 -54
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# These are supported funding model platforms
|
|
2
|
+
|
|
3
|
+
github: [ljharb]
|
|
4
|
+
patreon: # Replace with a single Patreon username
|
|
5
|
+
open_collective: # Replace with a single Open Collective username
|
|
6
|
+
ko_fi: # Replace with a single Ko-fi username
|
|
7
|
+
tidelift: npm/gopd
|
|
8
|
+
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
|
9
|
+
liberapay: # Replace with a single Liberapay username
|
|
10
|
+
issuehunt: # Replace with a single IssueHunt username
|
|
11
|
+
otechie: # Replace with a single Otechie username
|
|
12
|
+
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [v1.0.1](https://github.com/ljharb/gopd/compare/v1.0.0...v1.0.1) - 2022-11-01
|
|
9
|
+
|
|
10
|
+
### Commits
|
|
11
|
+
|
|
12
|
+
- [Fix] actually export gOPD instead of dP [`4b624bf`](https://github.com/ljharb/gopd/commit/4b624bfbeff788c5e3ff16d9443a83627847234f)
|
|
13
|
+
|
|
14
|
+
## v1.0.0 - 2022-11-01
|
|
15
|
+
|
|
16
|
+
### Commits
|
|
17
|
+
|
|
18
|
+
- Initial implementation, tests, readme [`0911e01`](https://github.com/ljharb/gopd/commit/0911e012cd642092bd88b732c161c58bf4f20bea)
|
|
19
|
+
- Initial commit [`b84e33f`](https://github.com/ljharb/gopd/commit/b84e33f5808a805ac57ff88d4247ad935569acbe)
|
|
20
|
+
- [actions] add reusable workflows [`12ae28a`](https://github.com/ljharb/gopd/commit/12ae28ae5f50f86e750215b6e2188901646d0119)
|
|
21
|
+
- npm init [`280118b`](https://github.com/ljharb/gopd/commit/280118badb45c80b4483836b5cb5315bddf6e582)
|
|
22
|
+
- [meta] add `auto-changelog` [`bb78de5`](https://github.com/ljharb/gopd/commit/bb78de5639a180747fb290c28912beaaf1615709)
|
|
23
|
+
- [meta] create FUNDING.yml; add `funding` in package.json [`11c22e6`](https://github.com/ljharb/gopd/commit/11c22e6355bb01f24e7fac4c9bb3055eb5b25002)
|
|
24
|
+
- [meta] use `npmignore` to autogenerate an npmignore file [`4f4537a`](https://github.com/ljharb/gopd/commit/4f4537a843b39f698c52f072845092e6fca345bb)
|
|
25
|
+
- Only apps should have lockfiles [`c567022`](https://github.com/ljharb/gopd/commit/c567022a18573aa7951cf5399445d9840e23e98b)
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2022 Jordan Harband
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# gopd <sup>[![Version Badge][npm-version-svg]][package-url]</sup>
|
|
2
|
+
|
|
3
|
+
[![github actions][actions-image]][actions-url]
|
|
4
|
+
[![coverage][codecov-image]][codecov-url]
|
|
5
|
+
[![License][license-image]][license-url]
|
|
6
|
+
[![Downloads][downloads-image]][downloads-url]
|
|
7
|
+
|
|
8
|
+
[![npm badge][npm-badge-png]][package-url]
|
|
9
|
+
|
|
10
|
+
`Object.getOwnPropertyDescriptor`, but accounts for IE's broken implementation.
|
|
11
|
+
|
|
12
|
+
## Usage
|
|
13
|
+
|
|
14
|
+
```javascript
|
|
15
|
+
var gOPD = require('gopd');
|
|
16
|
+
var assert = require('assert');
|
|
17
|
+
|
|
18
|
+
if (gOPD) {
|
|
19
|
+
assert.equal(typeof gOPD, 'function', 'descriptors supported');
|
|
20
|
+
// use gOPD like Object.getOwnPropertyDescriptor here
|
|
21
|
+
} else {
|
|
22
|
+
assert.ok(!gOPD, 'descriptors not supported');
|
|
23
|
+
}
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
[package-url]: https://npmjs.org/package/gopd
|
|
27
|
+
[npm-version-svg]: https://versionbadg.es/ljharb/gopd.svg
|
|
28
|
+
[deps-svg]: https://david-dm.org/ljharb/gopd.svg
|
|
29
|
+
[deps-url]: https://david-dm.org/ljharb/gopd
|
|
30
|
+
[dev-deps-svg]: https://david-dm.org/ljharb/gopd/dev-status.svg
|
|
31
|
+
[dev-deps-url]: https://david-dm.org/ljharb/gopd#info=devDependencies
|
|
32
|
+
[npm-badge-png]: https://nodei.co/npm/gopd.png?downloads=true&stars=true
|
|
33
|
+
[license-image]: https://img.shields.io/npm/l/gopd.svg
|
|
34
|
+
[license-url]: LICENSE
|
|
35
|
+
[downloads-image]: https://img.shields.io/npm/dm/gopd.svg
|
|
36
|
+
[downloads-url]: https://npm-stat.com/charts.html?package=gopd
|
|
37
|
+
[codecov-image]: https://codecov.io/gh/ljharb/gopd/branch/main/graphs/badge.svg
|
|
38
|
+
[codecov-url]: https://app.codecov.io/gh/ljharb/gopd/
|
|
39
|
+
[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/gopd
|
|
40
|
+
[actions-url]: https://github.com/ljharb/gopd/actions
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var GetIntrinsic = require('get-intrinsic');
|
|
4
|
+
|
|
5
|
+
var $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);
|
|
6
|
+
|
|
7
|
+
if ($gOPD) {
|
|
8
|
+
try {
|
|
9
|
+
$gOPD([], 'length');
|
|
10
|
+
} catch (e) {
|
|
11
|
+
// IE 8 has a broken gOPD
|
|
12
|
+
$gOPD = null;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
module.exports = $gOPD;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "gopd",
|
|
3
|
+
"version": "1.0.1",
|
|
4
|
+
"description": "`Object.getOwnPropertyDescriptor`, but accounts for IE's broken implementation.",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"exports": {
|
|
7
|
+
".": "./index.js",
|
|
8
|
+
"./package.json": "./package.json"
|
|
9
|
+
},
|
|
10
|
+
"sideEffects": false,
|
|
11
|
+
"scripts": {
|
|
12
|
+
"prepack": "npmignore --auto --commentLines=autogenerated",
|
|
13
|
+
"prepublishOnly": "safe-publish-latest",
|
|
14
|
+
"prepublish": "not-in-publish || npm run prepublishOnly",
|
|
15
|
+
"lint": "eslint --ext=js,mjs .",
|
|
16
|
+
"postlint": "evalmd README.md",
|
|
17
|
+
"pretest": "npm run lint",
|
|
18
|
+
"tests-only": "tape 'test/**/*.js'",
|
|
19
|
+
"test": "npm run tests-only",
|
|
20
|
+
"posttest": "aud --production",
|
|
21
|
+
"version": "auto-changelog && git add CHANGELOG.md",
|
|
22
|
+
"postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""
|
|
23
|
+
},
|
|
24
|
+
"repository": {
|
|
25
|
+
"type": "git",
|
|
26
|
+
"url": "git+https://github.com/ljharb/gopd.git"
|
|
27
|
+
},
|
|
28
|
+
"keywords": [
|
|
29
|
+
"ecmascript",
|
|
30
|
+
"javascript",
|
|
31
|
+
"getownpropertydescriptor",
|
|
32
|
+
"property",
|
|
33
|
+
"descriptor"
|
|
34
|
+
],
|
|
35
|
+
"author": "Jordan Harband <ljharb@gmail.com>",
|
|
36
|
+
"funding": {
|
|
37
|
+
"url": "https://github.com/sponsors/ljharb"
|
|
38
|
+
},
|
|
39
|
+
"license": "MIT",
|
|
40
|
+
"bugs": {
|
|
41
|
+
"url": "https://github.com/ljharb/gopd/issues"
|
|
42
|
+
},
|
|
43
|
+
"homepage": "https://github.com/ljharb/gopd#readme",
|
|
44
|
+
"dependencies": {
|
|
45
|
+
"get-intrinsic": "^1.1.3"
|
|
46
|
+
},
|
|
47
|
+
"devDependencies": {
|
|
48
|
+
"@ljharb/eslint-config": "^21.0.0",
|
|
49
|
+
"aud": "^2.0.1",
|
|
50
|
+
"auto-changelog": "^2.4.0",
|
|
51
|
+
"eslint": "=8.8.0",
|
|
52
|
+
"evalmd": "^0.0.19",
|
|
53
|
+
"in-publish": "^2.0.1",
|
|
54
|
+
"npmignore": "^0.3.0",
|
|
55
|
+
"safe-publish-latest": "^2.0.0",
|
|
56
|
+
"tape": "^5.6.1"
|
|
57
|
+
},
|
|
58
|
+
"auto-changelog": {
|
|
59
|
+
"output": "CHANGELOG.md",
|
|
60
|
+
"template": "keepachangelog",
|
|
61
|
+
"unreleased": false,
|
|
62
|
+
"commitLimit": false,
|
|
63
|
+
"backfillLimit": false,
|
|
64
|
+
"hideCredit": true
|
|
65
|
+
},
|
|
66
|
+
"publishConfig": {
|
|
67
|
+
"ignore": [
|
|
68
|
+
".github/workflows"
|
|
69
|
+
]
|
|
70
|
+
}
|
|
71
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var test = require('tape');
|
|
4
|
+
var gOPD = require('../');
|
|
5
|
+
|
|
6
|
+
test('gOPD', function (t) {
|
|
7
|
+
t.test('supported', { skip: !gOPD }, function (st) {
|
|
8
|
+
st.equal(typeof gOPD, 'function', 'is a function');
|
|
9
|
+
|
|
10
|
+
var obj = { x: 1 };
|
|
11
|
+
st.ok('x' in obj, 'property exists');
|
|
12
|
+
|
|
13
|
+
var desc = gOPD(obj, 'x');
|
|
14
|
+
st.deepEqual(
|
|
15
|
+
desc,
|
|
16
|
+
{
|
|
17
|
+
configurable: true,
|
|
18
|
+
enumerable: true,
|
|
19
|
+
value: 1,
|
|
20
|
+
writable: true
|
|
21
|
+
},
|
|
22
|
+
'descriptor is as expected'
|
|
23
|
+
);
|
|
24
|
+
|
|
25
|
+
st.end();
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
t.test('not supported', { skip: gOPD }, function (st) {
|
|
29
|
+
st.notOk(gOPD, 'is falsy');
|
|
30
|
+
|
|
31
|
+
st.end();
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
t.end();
|
|
35
|
+
});
|
|
@@ -5,6 +5,14 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [v1.5.1](https://github.com/es-shims/RegExp.prototype.flags/compare/v1.5.0...v1.5.1) - 2023-09-12
|
|
9
|
+
|
|
10
|
+
### Commits
|
|
11
|
+
|
|
12
|
+
- [Refactor] use `set-function-name` [`1384147`](https://github.com/es-shims/RegExp.prototype.flags/commit/13841474baf5700de8e3f65fae3670ad1b233483)
|
|
13
|
+
- [Dev Deps] update `@es-shims/api`, `@ljharb/eslint-config`, `aud`, `available-regexp-flags`, `tape` [`07bf9a2`](https://github.com/es-shims/RegExp.prototype.flags/commit/07bf9a2c354cc41379b01fe5c383233adaaccf0e)
|
|
14
|
+
- [Dev Deps] add missing `npmignore` dep [`8ca9dfe`](https://github.com/es-shims/RegExp.prototype.flags/commit/8ca9dfe4da31ef74ee48a4dcf62692eebb8f8fdd)
|
|
15
|
+
|
|
8
16
|
## [v1.5.0](https://github.com/es-shims/RegExp.prototype.flags/compare/v1.4.3...v1.5.0) - 2023-04-18
|
|
9
17
|
|
|
10
18
|
### Commits
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var setFunctionName = require('set-function-name');
|
|
4
4
|
|
|
5
5
|
var $Object = Object;
|
|
6
6
|
var $TypeError = TypeError;
|
|
7
7
|
|
|
8
|
-
module.exports = function flags() {
|
|
8
|
+
module.exports = setFunctionName(function flags() {
|
|
9
9
|
if (this != null && this !== $Object(this)) {
|
|
10
10
|
throw new $TypeError('RegExp.prototype.flags getter called on non-object');
|
|
11
11
|
}
|
|
@@ -35,8 +35,5 @@ module.exports = function flags() {
|
|
|
35
35
|
result += 'y';
|
|
36
36
|
}
|
|
37
37
|
return result;
|
|
38
|
-
};
|
|
38
|
+
}, 'get flags', true);
|
|
39
39
|
|
|
40
|
-
if (functionsHaveConfigurableNames && Object.defineProperty) {
|
|
41
|
-
Object.defineProperty(module.exports, 'name', { value: 'get flags' });
|
|
42
|
-
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "regexp.prototype.flags",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.1",
|
|
4
4
|
"author": "Jordan Harband <ljharb@gmail.com>",
|
|
5
5
|
"funding": {
|
|
6
6
|
"url": "https://github.com/sponsors/ljharb"
|
|
@@ -42,18 +42,19 @@
|
|
|
42
42
|
"dependencies": {
|
|
43
43
|
"call-bind": "^1.0.2",
|
|
44
44
|
"define-properties": "^1.2.0",
|
|
45
|
-
"
|
|
45
|
+
"set-function-name": "^2.0.0"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
|
-
"@es-shims/api": "^2.
|
|
49
|
-
"@ljharb/eslint-config": "^21.0
|
|
50
|
-
"aud": "^2.0.
|
|
48
|
+
"@es-shims/api": "^2.4.2",
|
|
49
|
+
"@ljharb/eslint-config": "^21.1.0",
|
|
50
|
+
"aud": "^2.0.3",
|
|
51
51
|
"auto-changelog": "^2.4.0",
|
|
52
|
-
"available-regexp-flags": "^1.0.
|
|
52
|
+
"available-regexp-flags": "^1.0.2",
|
|
53
53
|
"covert": "^1.1.1",
|
|
54
54
|
"eclint": "^2.8.1",
|
|
55
55
|
"eslint": "=8.8.0",
|
|
56
56
|
"for-each": "^0.3.3",
|
|
57
|
+
"functions-have-names": "^1.2.3",
|
|
57
58
|
"has": "^1.0.3",
|
|
58
59
|
"has-strict-mode": "^1.0.1",
|
|
59
60
|
"in-publish": "^2.0.1",
|
|
@@ -61,7 +62,7 @@
|
|
|
61
62
|
"nyc": "^10.3.2",
|
|
62
63
|
"object-inspect": "^1.12.3",
|
|
63
64
|
"safe-publish-latest": "^2.0.0",
|
|
64
|
-
"tape": "^5.6.
|
|
65
|
+
"tape": "^5.6.6"
|
|
65
66
|
},
|
|
66
67
|
"testling": {
|
|
67
68
|
"files": "test/index.js",
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"root": true,
|
|
3
|
+
|
|
4
|
+
"extends": "@ljharb",
|
|
5
|
+
|
|
6
|
+
"rules": {
|
|
7
|
+
"id-length": "off",
|
|
8
|
+
},
|
|
9
|
+
|
|
10
|
+
"overrides": [
|
|
11
|
+
{
|
|
12
|
+
"files": ["test/**/*.js"],
|
|
13
|
+
"rules": {
|
|
14
|
+
"id-length": "off",
|
|
15
|
+
"multiline-comment-style": "off",
|
|
16
|
+
"no-empty-function": "off",
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
],
|
|
20
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# These are supported funding model platforms
|
|
2
|
+
|
|
3
|
+
github: [ljharb]
|
|
4
|
+
patreon: # Replace with a single Patreon username
|
|
5
|
+
open_collective: # Replace with a single Open Collective username
|
|
6
|
+
ko_fi: # Replace with a single Ko-fi username
|
|
7
|
+
tidelift: npm/set-function-name
|
|
8
|
+
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
|
9
|
+
liberapay: # Replace with a single Liberapay username
|
|
10
|
+
issuehunt: # Replace with a single IssueHunt username
|
|
11
|
+
otechie: # Replace with a single Otechie username
|
|
12
|
+
custom: # Replace with a single custom sponsorship URL
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [v2.0.1](https://github.com/jfsiii/set-function-name/compare/v2.0.0...v2.0.1) - 2023-09-13
|
|
9
|
+
|
|
10
|
+
### Commits
|
|
11
|
+
|
|
12
|
+
- [Fix] move `functions-have-names` to runtime deps [`db2eda8`](https://github.com/jfsiii/set-function-name/commit/db2eda8da4c8aecfad01739000bbd63d04a8e8cf)
|
|
13
|
+
|
|
14
|
+
## [v2.0.0](https://github.com/jfsiii/set-function-name/compare/v1.0.0...v2.0.0) - 2023-09-12
|
|
15
|
+
|
|
16
|
+
### Commits
|
|
17
|
+
|
|
18
|
+
- [eslint] add `npm run lint` [`23e1fcd`](https://github.com/jfsiii/set-function-name/commit/23e1fcd85b64b864cb8f7e894da78d540e72923a)
|
|
19
|
+
- [actions] add reused GHA [`525127e`](https://github.com/jfsiii/set-function-name/commit/525127e08bdb35b0d44f565492456c7d1d5923fc)
|
|
20
|
+
- [meta] add `.gitignore` [`aa3abdf`](https://github.com/jfsiii/set-function-name/commit/aa3abdfa6af18adf70281352905dd69ef8b2c66f)
|
|
21
|
+
- [Tests] switch tests to use tape; add posttest [`8ad6d30`](https://github.com/jfsiii/set-function-name/commit/8ad6d30c61f78d2f9beec156ba7f1c4c3741c593)
|
|
22
|
+
- [readme] add readme [`732c46c`](https://github.com/jfsiii/set-function-name/commit/732c46c05e0fa6843dbc85b3af1e9c9bf22e7bf9)
|
|
23
|
+
- [New] add optional `loose` argument [`f5e4771`](https://github.com/jfsiii/set-function-name/commit/f5e4771266c95567d87f6dc2cff94c986bc7e074)
|
|
24
|
+
- [meta] relicense package to MIT; fix repo URLs [`13948f8`](https://github.com/jfsiii/set-function-name/commit/13948f8bb4ec8a25b67332d8de232ad0c0dc4e6d)
|
|
25
|
+
- [meta] add `auto-changelog` [`7ab201c`](https://github.com/jfsiii/set-function-name/commit/7ab201c0d83d464664cc4588acad0d0f75926679)
|
|
26
|
+
- [Breaking] throw if a non-function is provided [`cf6fc8f`](https://github.com/jfsiii/set-function-name/commit/cf6fc8f3396d58aa8c32a83375cbf57d933d7e79)
|
|
27
|
+
- [Breaking] drop UMD, just use CJS [`47abfe8`](https://github.com/jfsiii/set-function-name/commit/47abfe89abfaa72f71e0a77a52a5ff2b7377e11a)
|
|
28
|
+
- [Refactor] use `define-data-property` and `has-property-descriptors` [`9921c2b`](https://github.com/jfsiii/set-function-name/commit/9921c2b64c571255084aefaa02660314609e8ea0)
|
|
29
|
+
- [meta] use `npmignore` to autogenerate an npmignore file [`c5dbe4f`](https://github.com/jfsiii/set-function-name/commit/c5dbe4f4c44298596338432e2ac9946a10c98edd)
|
|
30
|
+
- Only apps should have lockfiles [`98bbfa1`](https://github.com/jfsiii/set-function-name/commit/98bbfa145387f318152a6b792bd69aca3c544813)
|
|
31
|
+
- [meta] add `safe-publish-latest` [`8916cd8`](https://github.com/jfsiii/set-function-name/commit/8916cd8f5549dceee31f06d35a76e2f9d4933a8b)
|
|
32
|
+
- [meta] add `engines` [`2427c8e`](https://github.com/jfsiii/set-function-name/commit/2427c8e2499f378c9ff3d92c7d544c771ca810df)
|
|
33
|
+
|
|
34
|
+
## v1.0.0 - 2017-09-14
|
|
35
|
+
|
|
36
|
+
### Commits
|
|
37
|
+
|
|
38
|
+
- Initial commit. Including tests. [`f26a1f2`](https://github.com/jfsiii/set-function-name/commit/f26a1f2c69a70dad5049b1daa08eae5f6acd9a1e)
|
|
39
|
+
- add .npmignore to ignore test directory [`9cac96f`](https://github.com/jfsiii/set-function-name/commit/9cac96fd9e98f25883be6e727ac32356522a5d69)
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) Jordan Harband and contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# set-function-name <sup>[![Version Badge][npm-version-svg]][package-url]</sup>
|
|
2
|
+
|
|
3
|
+
[![github actions][actions-image]][actions-url]
|
|
4
|
+
[![coverage][codecov-image]][codecov-url]
|
|
5
|
+
[![License][license-image]][license-url]
|
|
6
|
+
[![Downloads][downloads-image]][downloads-url]
|
|
7
|
+
|
|
8
|
+
[![npm badge][npm-badge-png]][package-url]
|
|
9
|
+
|
|
10
|
+
Set a function’s name.
|
|
11
|
+
|
|
12
|
+
Arguments:
|
|
13
|
+
- `fn`: the function
|
|
14
|
+
- `name`: the new name
|
|
15
|
+
- `loose`: Optional. If true, and the name fails to be set, do not throw. Default false.
|
|
16
|
+
|
|
17
|
+
Returns `fn`.
|
|
18
|
+
|
|
19
|
+
## Usage
|
|
20
|
+
|
|
21
|
+
```javascript
|
|
22
|
+
var setFunctionName = require('set-function-name');
|
|
23
|
+
var assert = require('assert');
|
|
24
|
+
|
|
25
|
+
const obj = {
|
|
26
|
+
concise() {},
|
|
27
|
+
arrow: () => {},
|
|
28
|
+
named: function named() {},
|
|
29
|
+
anon: function () {},
|
|
30
|
+
};
|
|
31
|
+
assert.equal(obj.concise.name, 'concise');
|
|
32
|
+
assert.equal(obj.arrow.name, 'arrow');
|
|
33
|
+
assert.equal(obj.named.name, 'named');
|
|
34
|
+
assert.equal(obj.anon.name, 'anon');
|
|
35
|
+
|
|
36
|
+
assert.equal(setFunctionName(obj.concise, 'brief'), obj.concise);
|
|
37
|
+
assert.equal(setFunctionName(obj.arrow, 'pointy'), obj.arrow);
|
|
38
|
+
assert.equal(setFunctionName(obj.named, ''), obj.named);
|
|
39
|
+
assert.equal(setFunctionName(obj.anon, 'anonymous'), obj.anon);
|
|
40
|
+
|
|
41
|
+
assert.equal(obj.concise.name, 'brief');
|
|
42
|
+
assert.equal(obj.arrow.name, 'pointy');
|
|
43
|
+
assert.equal(obj.named.name, '');
|
|
44
|
+
assert.equal(obj.anon.name, 'anonymous');
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
[package-url]: https://npmjs.org/package/set-function-name
|
|
48
|
+
[npm-version-svg]: https://versionbadg.es/ljharb/set-function-name.svg
|
|
49
|
+
[deps-svg]: https://david-dm.org/ljharb/set-function-name.svg
|
|
50
|
+
[deps-url]: https://david-dm.org/ljharb/set-function-name
|
|
51
|
+
[dev-deps-svg]: https://david-dm.org/ljharb/set-function-name/dev-status.svg
|
|
52
|
+
[dev-deps-url]: https://david-dm.org/ljharb/set-function-name#info=devDependencies
|
|
53
|
+
[npm-badge-png]: https://nodei.co/npm/set-function-name.png?downloads=true&stars=true
|
|
54
|
+
[license-image]: https://img.shields.io/npm/l/set-function-name.svg
|
|
55
|
+
[license-url]: LICENSE
|
|
56
|
+
[downloads-image]: https://img.shields.io/npm/dm/set-function-name.svg
|
|
57
|
+
[downloads-url]: https://npm-stat.com/charts.html?package=set-function-name
|
|
58
|
+
[codecov-image]: https://codecov.io/gh/ljharb/set-function-name/branch/main/graphs/badge.svg
|
|
59
|
+
[codecov-url]: https://app.codecov.io/gh/ljharb/set-function-name/
|
|
60
|
+
[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/set-function-name
|
|
61
|
+
[actions-url]: https://github.com/ljharb/set-function-name/actions
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var define = require('define-data-property');
|
|
4
|
+
var hasDescriptors = require('has-property-descriptors')();
|
|
5
|
+
var functionsHaveConfigurableNames = require('functions-have-names').functionsHaveConfigurableNames();
|
|
6
|
+
|
|
7
|
+
var $TypeError = TypeError;
|
|
8
|
+
|
|
9
|
+
module.exports = function setFunctionName(fn, name) {
|
|
10
|
+
if (typeof fn !== 'function') {
|
|
11
|
+
throw new $TypeError('`fn` is not a function');
|
|
12
|
+
}
|
|
13
|
+
var loose = arguments.length > 2 && !!arguments[2];
|
|
14
|
+
if (!loose || functionsHaveConfigurableNames) {
|
|
15
|
+
if (hasDescriptors) {
|
|
16
|
+
define(fn, 'name', name, true, true);
|
|
17
|
+
} else {
|
|
18
|
+
define(fn, 'name', name);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
return fn;
|
|
22
|
+
};
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "set-function-name",
|
|
3
|
+
"version": "2.0.1",
|
|
4
|
+
"description": "Set a function's name property",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"directories": {
|
|
7
|
+
"test": "test"
|
|
8
|
+
},
|
|
9
|
+
"scripts": {
|
|
10
|
+
"prepack": "npmignore --auto --commentLines=autogenerated",
|
|
11
|
+
"prepublish": "not-in-publish || npm run prepublishOnly",
|
|
12
|
+
"prepublishOnly": "safe-publish-latest",
|
|
13
|
+
"lint": "eslint --ext=js,mjs .",
|
|
14
|
+
"postlint": "evalmd README.md",
|
|
15
|
+
"pretest": "npm run lint",
|
|
16
|
+
"tests-only": "tape 'test/**/*.js'",
|
|
17
|
+
"test": "npm run tests-only",
|
|
18
|
+
"posttest": "aud --production",
|
|
19
|
+
"version": "auto-changelog && git add CHANGELOG.md",
|
|
20
|
+
"postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""
|
|
21
|
+
},
|
|
22
|
+
"repository": {
|
|
23
|
+
"type": "git",
|
|
24
|
+
"url": "git+https://github.com/ljharb/set-function-name.git"
|
|
25
|
+
},
|
|
26
|
+
"keywords": [
|
|
27
|
+
"set",
|
|
28
|
+
"assign",
|
|
29
|
+
"function",
|
|
30
|
+
"name",
|
|
31
|
+
"function.name"
|
|
32
|
+
],
|
|
33
|
+
"author": "Jordan Harband <ljharb@gmail.com>",
|
|
34
|
+
"license": "MIT",
|
|
35
|
+
"bugs": {
|
|
36
|
+
"url": "https://github.com/ljharb/set-function-name/issues"
|
|
37
|
+
},
|
|
38
|
+
"homepage": "https://github.com/ljharb/set-function-name#readme",
|
|
39
|
+
"devDependencies": {
|
|
40
|
+
"@ljharb/eslint-config": "^21.1.0",
|
|
41
|
+
"aud": "^2.0.3",
|
|
42
|
+
"auto-changelog": "^2.4.0",
|
|
43
|
+
"es-value-fixtures": "^1.4.2",
|
|
44
|
+
"eslint": "=8.8.0",
|
|
45
|
+
"evalmd": "^0.0.19",
|
|
46
|
+
"for-each": "^0.3.3",
|
|
47
|
+
"function.prototype.name": "^1.1.6",
|
|
48
|
+
"in-publish": "^2.0.1",
|
|
49
|
+
"make-arrow-function": "^1.2.0",
|
|
50
|
+
"make-async-function": "^1.0.0",
|
|
51
|
+
"make-async-generator-function": "^1.0.0",
|
|
52
|
+
"make-generator-function": "^2.0.0",
|
|
53
|
+
"npmignore": "^0.3.0",
|
|
54
|
+
"object-inspect": "^1.12.3",
|
|
55
|
+
"safe-publish-latest": "^2.0.0",
|
|
56
|
+
"tape": "^5.6.6"
|
|
57
|
+
},
|
|
58
|
+
"dependencies": {
|
|
59
|
+
"define-data-property": "^1.0.1",
|
|
60
|
+
"functions-have-names": "^1.2.3",
|
|
61
|
+
"has-property-descriptors": "^1.0.0"
|
|
62
|
+
},
|
|
63
|
+
"engines": {
|
|
64
|
+
"node": ">= 0.4"
|
|
65
|
+
},
|
|
66
|
+
"auto-changelog": {
|
|
67
|
+
"output": "CHANGELOG.md",
|
|
68
|
+
"template": "keepachangelog",
|
|
69
|
+
"unreleased": false,
|
|
70
|
+
"commitLimit": false,
|
|
71
|
+
"backfillLimit": false,
|
|
72
|
+
"hideCredit": true
|
|
73
|
+
},
|
|
74
|
+
"publishConfig": {
|
|
75
|
+
"ignore": [
|
|
76
|
+
".github/workflows",
|
|
77
|
+
"test"
|
|
78
|
+
]
|
|
79
|
+
}
|
|
80
|
+
}
|
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
## [9.0.1](https://github.com/uuidjs/uuid/compare/v9.0.0...v9.0.1) (2023-09-12)
|
|
6
|
+
|
|
7
|
+
### build
|
|
8
|
+
|
|
9
|
+
- Fix CI to work with Node.js 20.x
|
|
10
|
+
|
|
5
11
|
## [9.0.0](https://github.com/uuidjs/uuid/compare/v8.3.2...v9.0.0) (2022-09-05)
|
|
6
12
|
|
|
7
13
|
### ⚠ BREAKING CHANGES
|