push all website files

This commit is contained in:
Jacob Levine
2019-01-06 13:14:45 -06:00
parent d7301e26c3
commit d2d5d4c04e
15662 changed files with 2166516 additions and 0 deletions

83
website/functions/node_modules/call-signature/index.js generated vendored Normal file
View File

@@ -0,0 +1,83 @@
'use strict';
module.exports.parse = parse;
module.exports.generate = generate;
// TODO(jamestalmage): Allow full range of identifier characters instead of just ASCII
//
// This will likely require a build step
//
// SPEC: http://www.ecma-international.org/ecma-262/5.1/#sec-7.6
//
// TOOLING:
// https://github.com/mathiasbynens/regenerate
// https://www.npmjs.com/package/regjsgen
var regex = /^\s*(?:([A-Za-z$_][A-Za-z0-9$_]*)\s*\.)?\s*([A-Za-z$_][A-Za-z0-9$_]*)\s*\(\s*((?:[A-Za-z$_][A-Za-z0-9$_]*)|(?:\[\s*[A-Za-z$_][A-Za-z0-9$_]*\s*]))?((?:\s*,\s*(?:(?:[A-Za-z$_][A-Za-z0-9$_]*)|(?:\[\s*[A-Za-z$_][A-Za-z0-9$_]*\s*])))+)?\s*\)\s*$/;
function parse(str) {
var match = regex.exec(str);
if (!match) {
return null;
}
var callee;
if (match[1]) {
callee = {
type: 'MemberExpression',
object: match[1],
member: match[2]
};
} else {
callee = {
type: 'Identifier',
name: match[2]
};
}
var args = match[4] || '';
args = args.split(',');
if (match[3]) {
args[0] = match[3];
}
var trimmed = [];
args.forEach(function (str) {
var optional = false;
str = str.replace(/\s+/g, '');
if (!str.length) {
return;
}
if (str.charAt(0) === '[' && str.charAt(str.length - 1) === ']') {
optional = true;
str = str.substring(1, str.length - 1);
}
trimmed.push({
name: str,
optional: optional
});
});
return {
callee: callee,
args: trimmed
};
}
function generate(parsed) {
var callee;
if (parsed.callee.type === 'MemberExpression') {
callee = [
parsed.callee.object,
'.',
parsed.callee.member
];
} else {
callee = [parsed.callee.name];
}
return callee.concat([
'(',
parsed.args.map(function (arg) {
return arg.optional ? '[' + arg.name + ']' : arg.name;
}).join(', '),
')'
]).join('');
}

21
website/functions/node_modules/call-signature/license generated vendored Normal file
View File

@@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) James Talmage <james@talmage.io> (github.com/jamestalmage)
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.

View File

@@ -0,0 +1,64 @@
{
"_from": "call-signature@0.0.2",
"_id": "call-signature@0.0.2",
"_inBundle": false,
"_integrity": "sha1-qEq8glpV70yysCi9dOIFpluaSZY=",
"_location": "/call-signature",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "call-signature@0.0.2",
"name": "call-signature",
"escapedName": "call-signature",
"rawSpec": "0.0.2",
"saveSpec": null,
"fetchSpec": "0.0.2"
},
"_requiredBy": [
"/empower-core"
],
"_resolved": "https://registry.npmjs.org/call-signature/-/call-signature-0.0.2.tgz",
"_shasum": "a84abc825a55ef4cb2b028bd74e205a65b9a4996",
"_spec": "call-signature@0.0.2",
"_where": "C:\\Users\\jlevi\\Downloads\\tr2022-strategy-master\\tr2022-strategy-master\\data analysis\\functions\\node_modules\\empower-core",
"author": {
"name": "James Talmage",
"email": "james@talmage.io",
"url": "github.com/jamestalmage"
},
"bugs": {
"url": "https://github.com/jamestalmage/call-signature/issues"
},
"bundleDependencies": false,
"dependencies": {},
"deprecated": false,
"description": "Parse / Generate Method Signatures",
"devDependencies": {
"ava": "^0.5.0",
"xo": "^0.11.2"
},
"engines": {
"node": ">=0.10.0"
},
"files": [
"index.js"
],
"homepage": "https://github.com/jamestalmage/call-signature#readme",
"keywords": [],
"license": "MIT",
"name": "call-signature",
"repository": {
"type": "git",
"url": "git+https://github.com/jamestalmage/call-signature.git"
},
"scripts": {
"test": "xo && ava"
},
"version": "0.0.2",
"xo": {
"ignores": [
"test.js"
]
}
}

113
website/functions/node_modules/call-signature/readme.md generated vendored Normal file
View File

@@ -0,0 +1,113 @@
# call-signature [![Build Status](https://travis-ci.org/jamestalmage/call-signature.svg?branch=master)](https://travis-ci.org/jamestalmage/call-signature)
> Parse / Generate Method Signatures
## Install
```
$ npm install --save call-signature
```
## Usage
```js
var signature = require('call-signature');
// parse a call signature definition
var parsed = signature.parse('t.equal(expected, actual, [message])');
console.log(parsed);
/* =>
{
callee: {
type: 'MemberExpression',
object: 't',
member: 'equal'
},
args: [
{
name: 'actual',
optional: false
},
{
name: 'expected',
optional: false
},
{
name: 'message',
optional: true
}
]
}
*/
// Create signature definitions from the parsed object.
signature.generate(parsed);
//=> "t.equal(expected, actual, [message])"
```
## API
### callSignature.parse(input)
#### input
Type: `string`
A string that matches the call signature spec:
`object.member(required_arg1, required_arg2, [optional_arg1])`
`name(required_arg1, required_arg2, [optional_arg1])`
`object`, `member` and `name` can be any identifiers, but currently the callee must be a `MemberExpression` or an `Identifier` (that requirement may loosen in the future).
You can have any number of arguments. Optional arguments are denoted by placing the argument name between square `[`brackets`]`.
#### returns
A simple JS Object with three properties `callee` and `args`.
`callee` will be an object containing `type` property and its corresponding properties.
when matched against `MemberExpression` like `foo.bar(baz)`, `object` and `member` will be strings.
callee: {
type: 'MemberExpression',
object: 'foo',
member: 'bar'
}
when matched against `Identifier` like `foo(baz)`, `name` will be string.
callee: {
type: 'Identifier',
name: 'foo'
}
`args` will be an array. Each item of the array will have two properties `name`, and `optional`.
`name` will be the `string` name of the arg. `optional` will be a boolean value.
### callSignature.generate(parsed)
#### input
Type: `Object`
Must have the same definition as the return value from the `parse` method.
#### returns
A `string` signature definition that will parse to exactly the provided input.
## Related
- [escallmatch](https://www.npmjs.com/package/escallmatch) - Similar, with compatible string definitions to this library. Can be used to match AST Nodes to parsed signatures.
## License
MIT © [James Talmage](http://github.com/jamestalmage)