forked from enviPath/enviPy
Current Dev State
This commit is contained in:
7
static/js/ketcher2/node_modules/mimic-fn/index.js
generated
vendored
Normal file
7
static/js/ketcher2/node_modules/mimic-fn/index.js
generated
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
'use strict';
|
||||
module.exports = (to, from) => {
|
||||
// TODO: use `Reflect.ownKeys()` when targeting Node.js 6
|
||||
for (const prop of Object.getOwnPropertyNames(from).concat(Object.getOwnPropertySymbols(from))) {
|
||||
Object.defineProperty(to, prop, Object.getOwnPropertyDescriptor(from, prop));
|
||||
}
|
||||
};
|
||||
21
static/js/ketcher2/node_modules/mimic-fn/license
generated
vendored
Normal file
21
static/js/ketcher2/node_modules/mimic-fn/license
generated
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.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.
|
||||
76
static/js/ketcher2/node_modules/mimic-fn/package.json
generated
vendored
Normal file
76
static/js/ketcher2/node_modules/mimic-fn/package.json
generated
vendored
Normal file
@ -0,0 +1,76 @@
|
||||
{
|
||||
"_from": "mimic-fn@^1.0.0",
|
||||
"_id": "mimic-fn@1.1.0",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha1-5md4PZLonb00KBi1IwudYqZyrRg=",
|
||||
"_location": "/mimic-fn",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "mimic-fn@^1.0.0",
|
||||
"name": "mimic-fn",
|
||||
"escapedName": "mimic-fn",
|
||||
"rawSpec": "^1.0.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^1.0.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/ora/onetime",
|
||||
"/webdriverio/onetime"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.1.0.tgz",
|
||||
"_shasum": "e667783d92e89dbd342818b5230b9d62a672ad18",
|
||||
"_spec": "mimic-fn@^1.0.0",
|
||||
"_where": "/home/manfred/enviPath/ketcher2/ketcher/node_modules/ora/node_modules/onetime",
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "sindresorhus.com"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/sindresorhus/mimic-fn/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"deprecated": false,
|
||||
"description": "Make a function mimic another one",
|
||||
"devDependencies": {
|
||||
"ava": "*",
|
||||
"xo": "*"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=4"
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"homepage": "https://github.com/sindresorhus/mimic-fn#readme",
|
||||
"keywords": [
|
||||
"function",
|
||||
"mimic",
|
||||
"imitate",
|
||||
"rename",
|
||||
"copy",
|
||||
"inherit",
|
||||
"properties",
|
||||
"name",
|
||||
"func",
|
||||
"fn",
|
||||
"set",
|
||||
"infer",
|
||||
"change"
|
||||
],
|
||||
"license": "MIT",
|
||||
"name": "mimic-fn",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/sindresorhus/mimic-fn.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "xo && ava"
|
||||
},
|
||||
"version": "1.1.0",
|
||||
"xo": {
|
||||
"esnext": true
|
||||
}
|
||||
}
|
||||
66
static/js/ketcher2/node_modules/mimic-fn/readme.md
generated
vendored
Normal file
66
static/js/ketcher2/node_modules/mimic-fn/readme.md
generated
vendored
Normal file
@ -0,0 +1,66 @@
|
||||
# mimic-fn [](https://travis-ci.org/sindresorhus/mimic-fn)
|
||||
|
||||
> Make a function mimic another one
|
||||
|
||||
Useful when you wrap a function in another function and like to preserve the original name and other properties.
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
$ npm install --save mimic-fn
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
const mimicFn = require('mimic-fn');
|
||||
|
||||
function foo() {}
|
||||
foo.unicorn = '🦄';
|
||||
|
||||
function wrapper() {
|
||||
return foo() {};
|
||||
}
|
||||
|
||||
console.log(wrapper.name);
|
||||
//=> 'wrapper'
|
||||
|
||||
mimicFn(wrapper, foo);
|
||||
|
||||
console.log(wrapper.name);
|
||||
//=> 'foo'
|
||||
|
||||
console.log(wrapper.unicorn);
|
||||
//=> '🦄'
|
||||
```
|
||||
|
||||
|
||||
## API
|
||||
|
||||
It will copy over the properties `name`, `length`, `displayName`, and any custom properties you may have set.
|
||||
|
||||
### mimicFn(to, from)
|
||||
|
||||
#### to
|
||||
|
||||
Type: `Function`
|
||||
|
||||
Mimicking function.
|
||||
|
||||
#### from
|
||||
|
||||
Type: `Function`
|
||||
|
||||
Function to mimic.
|
||||
|
||||
|
||||
## Related
|
||||
|
||||
- [rename-fn](https://github.com/sindresorhus/rename-fn) - Rename a function
|
||||
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Sindre Sorhus](https://sindresorhus.com)
|
||||
Reference in New Issue
Block a user