This commit is contained in:
lalBi94
2023-03-05 13:23:23 +01:00
commit 7bc56c09b5
14034 changed files with 1834369 additions and 0 deletions

19
node_modules/get-func-name/LICENSE generated vendored Normal file
View File

@@ -0,0 +1,19 @@
Copyright (c) 2013 Jake Luer <jake@alogicalparadox.com> (http://alogicalparadox.com)
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.

123
node_modules/get-func-name/README.md generated vendored Normal file
View File

@@ -0,0 +1,123 @@
<h1 align=center>
<a href="http://chaijs.com" title="Chai Documentation">
<img alt="ChaiJS" src="http://chaijs.com/img/chai-logo.png"/>
<br>
get-func-name
</a>
</h1>
<p align=center>
Utility for getting a function's name for <a href="http://nodejs.org">node</a> and the browser.
</p>
<p align=center>
<a href="./LICENSE">
<img
alt="license:mit"
src="https://img.shields.io/badge/license-mit-green.svg?style=flat-square"
/>
</a>
<a href="https://github.com/chaijs/get-func-name/releases">
<img
alt="tag:?"
src="https://img.shields.io/github/tag/chaijs/get-func-name.svg?style=flat-square"
/>
</a>
<a href="https://travis-ci.org/chaijs/get-func-name">
<img
alt="build:?"
src="https://img.shields.io/travis/chaijs/get-func-name/master.svg?style=flat-square"
/>
</a>
<a href="https://coveralls.io/r/chaijs/get-func-name">
<img
alt="coverage:?"
src="https://img.shields.io/coveralls/chaijs/get-func-name/master.svg?style=flat-square"
/>
</a>
<a href="https://www.npmjs.com/packages/get-func-name">
<img
alt="npm:?"
src="https://img.shields.io/npm/v/get-func-name.svg?style=flat-square"
/>
</a>
<a href="https://www.npmjs.com/packages/get-func-name">
<img
alt="dependencies:?"
src="https://img.shields.io/npm/dm/get-func-name.svg?style=flat-square"
/>
</a>
<a href="">
<img
alt="devDependencies:?"
src="https://img.shields.io/david/chaijs/get-func-name.svg?style=flat-square"
/>
</a>
<br/>
<a href="https://saucelabs.com/u/chaijs-get-func-name">
<img
alt="Selenium Test Status"
src="https://saucelabs.com/browser-matrix/chaijs-get-func-name.svg"
/>
</a>
<br>
<a href="https://chai-slack.herokuapp.com/">
<img
alt="Join the Slack chat"
src="https://img.shields.io/badge/slack-join%20chat-E2206F.svg?style=flat-square"
/>
</a>
<a href="https://gitter.im/chaijs/chai">
<img
alt="Join the Gitter chat"
src="https://img.shields.io/badge/gitter-join%20chat-D0104D.svg?style=flat-square"
/>
</a>
</p>
## What is get-func-name?
This is a module to retrieve a function's name securely and consistently both in NodeJS and the browser.
## Installation
### Node.js
`get-func-name` is available on [npm](http://npmjs.org). To install it, type:
$ npm install get-func-name
### Browsers
You can also use it within the browser; install via npm and use the `get-func-name.js` file found within the download. For example:
```html
<script src="./node_modules/get-func-name/get-func-name.js"></script>
```
## Usage
The module `get-func-name` exports the following method:
* `getFuncName(fn)` - Returns the name of a function.
```js
var getFuncName = require('get-func-name');
```
#### .getFuncName(fun)
```js
var getFuncName = require('get-func-name');
var unknownFunction = function myCoolFunction(word) {
return word + 'is cool';
};
var anonymousFunction = (function () {
return function () {};
}());
getFuncName(unknownFunction) // 'myCoolFunction'
getFuncName(anonymousFunction) // ''
```

48
node_modules/get-func-name/get-func-name.js generated vendored Normal file
View File

@@ -0,0 +1,48 @@
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.getFuncName = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
'use strict';
/* !
* Chai - getFuncName utility
* Copyright(c) 2012-2016 Jake Luer <jake@alogicalparadox.com>
* MIT Licensed
*/
/**
* ### .getFuncName(constructorFn)
*
* Returns the name of a function.
* When a non-function instance is passed, returns `null`.
* This also includes a polyfill function if `aFunc.name` is not defined.
*
* @name getFuncName
* @param {Function} funct
* @namespace Utils
* @api public
*/
var toString = Function.prototype.toString;
var functionNameMatch = /\s*function(?:\s|\s*\/\*[^(?:*\/)]+\*\/\s*)*([^\s\(\/]+)/;
function getFuncName(aFunc) {
if (typeof aFunc !== 'function') {
return null;
}
var name = '';
if (typeof Function.prototype.name === 'undefined' && typeof aFunc.name === 'undefined') {
// Here we run a polyfill if Function does not support the `name` property and if aFunc.name is not defined
var match = toString.call(aFunc).match(functionNameMatch);
if (match) {
name = match[1];
}
} else {
// If we've got a `name` property we just use it
name = aFunc.name;
}
return name;
}
module.exports = getFuncName;
},{}]},{},[1])(1)
});

44
node_modules/get-func-name/index.js generated vendored Normal file
View File

@@ -0,0 +1,44 @@
'use strict';
/* !
* Chai - getFuncName utility
* Copyright(c) 2012-2016 Jake Luer <jake@alogicalparadox.com>
* MIT Licensed
*/
/**
* ### .getFuncName(constructorFn)
*
* Returns the name of a function.
* When a non-function instance is passed, returns `null`.
* This also includes a polyfill function if `aFunc.name` is not defined.
*
* @name getFuncName
* @param {Function} funct
* @namespace Utils
* @api public
*/
var toString = Function.prototype.toString;
var functionNameMatch = /\s*function(?:\s|\s*\/\*[^(?:*\/)]+\*\/\s*)*([^\s\(\/]+)/;
function getFuncName(aFunc) {
if (typeof aFunc !== 'function') {
return null;
}
var name = '';
if (typeof Function.prototype.name === 'undefined' && typeof aFunc.name === 'undefined') {
// Here we run a polyfill if Function does not support the `name` property and if aFunc.name is not defined
var match = toString.call(aFunc).match(functionNameMatch);
if (match) {
name = match[1];
}
} else {
// If we've got a `name` property we just use it
name = aFunc.name;
}
return name;
}
module.exports = getFuncName;

85
node_modules/get-func-name/package.json generated vendored Normal file
View File

@@ -0,0 +1,85 @@
{
"name": "get-func-name",
"description": "Utility for getting a function's name for node and the browser",
"keywords": [
"get-func-name",
"chai util"
],
"license": "MIT",
"author": "Jake Luer <jake@alogicalparadox.com> (http://alogicalparadox.com)",
"contributors": [
"Keith Cirkel (https://github.com/keithamus)",
"Lucas Fernandes da Costa (https://github.com/lucasfcosta)",
"Grant Snodgrass (https://github.com/meeber)",
"Lucas Vieira (https://github.com/vieiralucas)",
"Aleksey Shvayka (https://github.com/shvaikalesh)"
],
"files": [
"index.js",
"get-func-name.js"
],
"main": "./index.js",
"repository": {
"type": "git",
"url": "git+ssh://git@github.com/chaijs/get-func-name.git"
},
"scripts": {
"build": "browserify --bare $npm_package_main --standalone getFuncName -o get-func-name.js",
"lint": "eslint --ignore-path .gitignore .",
"prepublish": "npm run build",
"semantic-release": "semantic-release pre && npm publish && semantic-release post",
"pretest": "npm run lint",
"test": "npm run test:node && npm run test:browser && npm run upload-coverage",
"test:browser": "karma start --singleRun=true",
"test:node": "istanbul cover _mocha",
"upload-coverage": "lcov-result-merger 'coverage/**/lcov.info' | coveralls; exit 0"
},
"config": {
"ghooks": {
"commit-msg": "validate-commit-msg"
}
},
"eslintConfig": {
"extends": [
"strict/es5"
],
"env": {
"es6": true
},
"globals": {
"HTMLElement": false
},
"rules": {
"complexity": 0,
"max-statements": 0
}
},
"dependencies": {},
"devDependencies": {
"browserify": "^13.0.0",
"browserify-istanbul": "^2.0.0",
"coveralls": "2.11.14",
"eslint": "^2.4.0",
"eslint-config-strict": "^9.1.0",
"eslint-plugin-filenames": "^1.1.0",
"ghooks": "^1.0.1",
"istanbul": "^0.4.2",
"karma": "^1.3.0",
"karma-browserify": "^5.0.2",
"karma-coverage": "^1.1.1",
"karma-mocha": "^1.2.0",
"karma-phantomjs-launcher": "^1.0.0",
"karma-sauce-launcher": "^1.0.0",
"lcov-result-merger": "^1.0.2",
"mocha": "^3.1.2",
"phantomjs-prebuilt": "^2.1.5",
"semantic-release": "^4.3.5",
"simple-assert": "^1.0.0",
"travis-after-all": "^1.4.4",
"validate-commit-msg": "^2.3.1"
},
"engines": {
"node": "*"
},
"version": "2.0.0"
}