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

View File

@@ -0,0 +1,27 @@
# Logs
logs
*.log
# Runtime data
pids
*.pid
*.seed
# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov
# Coverage directory used by tools like istanbul
coverage
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt
# node-waf configuration
.lock-wscript
# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release
# Dependency directory
# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git
node_modules

View File

@@ -0,0 +1,6 @@
language: node_js
node_js:
- "node"
- "0.12"
- "0.10"
- "iojs"

16
website/functions/node_modules/call-me-maybe/.zuul.yml generated vendored Normal file
View File

@@ -0,0 +1,16 @@
ui: mocha-bdd
browsers:
- name: chrome
version: -2..latest
- name: ie
version: -2..latest
- name: iphone
version: -3..latest
- name: safari
version: -4..latest
- name: firefox
version: -2..latest
- name: android
version: -3..latest
- name: opera
version: latest

22
website/functions/node_modules/call-me-maybe/LICENSE generated vendored Normal file
View File

@@ -0,0 +1,22 @@
The MIT License (MIT)
Copyright (c) 2015 Eric McCarthy
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.

26
website/functions/node_modules/call-me-maybe/README.md generated vendored Normal file
View File

@@ -0,0 +1,26 @@
# call-me-maybe [![Build Status](https://travis-ci.org/limulus/call-me-maybe.svg?branch=master)](https://travis-ci.org/limulus/call-me-maybe)
Let your JS API users either give you a callback or receive a promise.
## Usage
```javascript
var maybe = require("call-me-maybe")
module.exports = function asyncFunc (cb) {
return maybe(cb, new Promise(function(resolve, reject) {
// ...
}))
}
```
## API
### maybe(cb, promise)
If the callback `cb` is truthy, returns `undefined` and will call `cb` when `promise` is settled. The parameters passed to `cb` are standard error-first:
- If `promise` is fulfilled, then it is called with the result of the promise: `cb(null, result)`
- If `promise` is rejected, then it is called with the rejection error: `cb(err)`
If `cb` is falsey, then `promise` is retuned.

20
website/functions/node_modules/call-me-maybe/index.js generated vendored Normal file
View File

@@ -0,0 +1,20 @@
"use strict"
var next = (global.process && process.nextTick) || global.setImmediate || function (f) {
setTimeout(f, 0)
}
module.exports = function maybe (cb, promise) {
if (cb) {
promise
.then(function (result) {
next(function () { cb(null, result) })
}, function (err) {
next(function () { cb(err) })
})
return undefined
}
else {
return promise
}
}

View File

@@ -0,0 +1,61 @@
{
"_from": "call-me-maybe@^1.0.1",
"_id": "call-me-maybe@1.0.1",
"_inBundle": false,
"_integrity": "sha1-JtII6onje1y95gJQoV8DHBak1ms=",
"_location": "/call-me-maybe",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "call-me-maybe@^1.0.1",
"name": "call-me-maybe",
"escapedName": "call-me-maybe",
"rawSpec": "^1.0.1",
"saveSpec": null,
"fetchSpec": "^1.0.1"
},
"_requiredBy": [
"/@mrmlnc/readdir-enhanced"
],
"_resolved": "https://registry.npmjs.org/call-me-maybe/-/call-me-maybe-1.0.1.tgz",
"_shasum": "26d208ea89e37b5cbde60250a15f031c16a4d66b",
"_spec": "call-me-maybe@^1.0.1",
"_where": "C:\\Users\\jlevi\\Downloads\\tr2022-strategy-master\\tr2022-strategy-master\\data analysis\\functions\\node_modules\\@mrmlnc\\readdir-enhanced",
"author": {
"name": "Eric McCarthy",
"email": "eric@limulus.net",
"url": "http://www.limulus.net/"
},
"bugs": {
"url": "https://github.com/limulus/call-me-maybe/issues"
},
"bundleDependencies": false,
"dependencies": {},
"deprecated": false,
"description": "Let your JS API users either give you a callback or receive a promise",
"devDependencies": {
"mocha": "^2.3.2",
"promise": "^7.0.4",
"zuul": "^3.4.0"
},
"homepage": "https://github.com/limulus/call-me-maybe#readme",
"keywords": [
"promise",
"callback",
"denodeify",
"promisify",
"carlyraejepsen"
],
"license": "MIT",
"main": "index.js",
"name": "call-me-maybe",
"repository": {
"type": "git",
"url": "git+https://github.com/limulus/call-me-maybe.git"
},
"scripts": {
"test": "mocha"
},
"version": "1.0.1"
}

View File

@@ -0,0 +1,137 @@
"use strict"
var maybe = require("../")
var assert = require("assert")
var Promise = global.Promise || require("promise")
describe("maybe", function () {
it("should call the callback with result the promise is resolved to", function (done) {
var f = function f (cb) {
return maybe(cb, new Promise(function (resolve, reject) {
process.nextTick(function () {
return resolve("hi")
})
}))
}
f(function (err, result) {
assert.ifError(err, "no error")
assert.strictEqual(result, "hi")
return done()
})
})
it("should call the callback with the error the promise is rejected with", function (done) {
var f = function f (cb) {
return maybe(cb, new Promise(function (resolve, reject) {
process.nextTick(function () {
return reject(new Error("boom"))
})
}))
}
f(function (err, result) {
assert(err, "we got an error")
assert.strictEqual(result, undefined, "we got undefined result")
assert(err instanceof Error, "error is an Error")
assert.strictEqual(err.message, "boom", "error message is boom")
return done()
})
})
it("should return undefined when called with a callback", function () {
var f = function f (cb) {
return maybe(cb, new Promise(function (resolve, reject) {
//...
}))
}
var returnVal = f(function (err, result) {})
assert.strictEqual(returnVal, undefined, "returned val is undefined")
})
it("should return the same promise when no callback is provided", function () {
var p
var f = function f (cb) {
p = new Promise(function (resolve, reject) {
process.nextTick(function () {
return resolve("hi")
})
})
return maybe(cb, p)
}
var returnVal = f()
assert(p instanceof Promise, "returned val is a Promise")
assert.strictEqual(returnVal, p, "returned val is same obj (not a new Promise)")
})
it("should allow errors thrown in the callback to be uncaught", function (done) {
var mochaHandler
// Temporarily remove Mocha's global error handling so we can
// verify error is indeed uncaught by installing our own
// global error handler.
if (process.browser) {
mochaHandler = global.onerror
global.onerror = handleUncaughtException
}
else {
mochaHandler = process.listeners("uncaughtException").pop()
process.removeListener("uncaughtException", mochaHandler)
process.once("uncaughtException", handleUncaughtException)
}
var f = function f (cb) {
return maybe(cb, new Promise(function (resolve, reject) {
process.nextTick(function () {
return resolve("hi")
})
}))
}
f(function (err, result) {
throw new Error("yep")
})
function handleUncaughtException (err) {
// `err` is either an Error when running under Node, or a
// string if running under a browser.
var msg = err.message || err
assert(msg.match(/\byep\b/), "got expected error")
// Restore Mocha's global error handler.
if (process.browser) {
global.onerror = mochaHandler
}
else {
process.on("uncaughtException", mochaHandler)
}
done()
// Don't leak error to browser console
return true
}
})
it("should not let the callback be called more than once", function (done) {
var f = function f (cb) {
return maybe(cb, new Promise(function (resolve, reject) {
process.nextTick(function () {
resolve("foo")
})
}))
}
var called = 0
f(function (err, result) {
called++
assert(called <= 1, "called only once")
setTimeout(function () { done() }, 100)
return Promise.reject(new Error("bah"))
})
})
})