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

4
website/functions/node_modules/snakeize/.npmignore generated vendored Normal file
View File

@@ -0,0 +1,4 @@
node_modules
npm-debug.log
components
build

4
website/functions/node_modules/snakeize/.travis.yml generated vendored Normal file
View File

@@ -0,0 +1,4 @@
language: node_js
node_js:
- "0.8"
- "0.10"

18
website/functions/node_modules/snakeize/LICENSE generated vendored Normal file
View File

@@ -0,0 +1,18 @@
This software is released under the MIT license:
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.

17
website/functions/node_modules/snakeize/component.json generated vendored Normal file
View File

@@ -0,0 +1,17 @@
{
"name": "snakeize",
"repo": "nathan7/snakeize",
"description": "recursively transform key strings from camel-case to underscore-style",
"version": "0.1.0",
"keywords": [
"snake-case",
"json",
"transform"
],
"dependencies": {},
"development": {},
"license": "MIT",
"scripts": [
"index.js"
]
}

View File

@@ -0,0 +1,10 @@
var snakeize = require('../');
var obj = {
feeFieFoe: 'fum',
beepBoop: [
{ 'abc_xyz': 'mno' },
{ 'fooBar': 'baz' }
]
};
var res = snakeize(obj);
console.log(JSON.stringify(res, null, 2));

20
website/functions/node_modules/snakeize/index.js generated vendored Normal file
View File

@@ -0,0 +1,20 @@
module.exports = function walk (obj) {
if (!obj || typeof obj !== 'object') return obj;
if (isDate(obj) || isRegex(obj)) return obj;
if (Array.isArray(obj)) return obj.map(walk);
return Object.keys(obj).reduce(function (acc, key) {
var camel = key[0].toLowerCase() + key.slice(1).replace(/([A-Z]+)/g, function (m, x) {
return '_' + x.toLowerCase();
});
acc[camel] = walk(obj[key]);
return acc;
}, {});
};
var isDate = function (obj) {
return Object.prototype.toString.call(obj) === '[object Date]';
};
var isRegex = function (obj) {
return Object.prototype.toString.call(obj) === '[object RegExp]';
};

81
website/functions/node_modules/snakeize/package.json generated vendored Normal file
View File

@@ -0,0 +1,81 @@
{
"_from": "snakeize@^0.1.0",
"_id": "snakeize@0.1.0",
"_inBundle": false,
"_integrity": "sha1-EMCI2LWOsHazIpu1oE4jLOEmQi0=",
"_location": "/snakeize",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "snakeize@^0.1.0",
"name": "snakeize",
"escapedName": "snakeize",
"rawSpec": "^0.1.0",
"saveSpec": null,
"fetchSpec": "^0.1.0"
},
"_requiredBy": [
"/@google-cloud/storage"
],
"_resolved": "https://registry.npmjs.org/snakeize/-/snakeize-0.1.0.tgz",
"_shasum": "10c088d8b58eb076b3229bb5a04e232ce126422d",
"_spec": "snakeize@^0.1.0",
"_where": "C:\\Users\\jlevi\\Downloads\\tr2022-strategy-master\\tr2022-strategy-master\\data analysis\\functions\\node_modules\\@google-cloud\\storage",
"author": {
"name": "James Halliday",
"email": "mail@substack.net",
"url": "http://substack.net"
},
"bugs": {
"url": "https://github.com/nathan7/snakeize/issues"
},
"bundleDependencies": false,
"deprecated": false,
"description": "recursively transform key strings from camel-case to underscore-style",
"devDependencies": {
"tap": "~0.4.0",
"tape": "~0.3.0"
},
"homepage": "https://github.com/nathan7/snakeize",
"keywords": [
"snake-case",
"json",
"transform"
],
"license": "MIT",
"main": "index.js",
"name": "snakeize",
"repository": {
"type": "git",
"url": "git://github.com/nathan7/snakeize.git"
},
"scripts": {
"test": "tap test/*.js"
},
"testling": {
"files": "test/*.js",
"browsers": {
"iexplore": [
"6.0",
"7.0",
"8.0",
"9.0"
],
"chrome": [
"20.0"
],
"firefox": [
"10.0",
"15.0"
],
"safari": [
"5.1"
],
"opera": [
"12.0"
]
}
},
"version": "0.1.0"
}

View File

@@ -0,0 +1,70 @@
# snakeize
recursively transform key strings from camel-case to underscore-style.
Derives directly from [substack](https://github.com/substack)'s [camelize](https://github.com/substack/camelize)
[![build status](https://secure.travis-ci.org/nathan7/snakeize.png)](http://travis-ci.org/nathan7/snakeize)
[![browser support](https://ci.testling.com/nathan7/snakeize.png)](http://ci.testling.com/nathan7/snakeize)
# example
``` js
var snakeize = require('snakeize');
var obj = {
feeFieFoe: 'fum',
beepBoop: [
{ 'abcXyz': 'mno' },
{ 'FooBar': 'baz' },
{ 'CheeseID': 'wensleydale' }
]
};
var res = snakeize(obj);
console.log(JSON.stringify(res, null, 2));
```
output:
```
{
"fee_fie_foe": "fum",
"beep_boop": [
{
"abc_xyz": "mno"
},
{
"foo_bar": "baz"
},
{
"cheese_id": "wensleydale"
}
]
}
```
# methods
``` js
var snakeize = require('snakeize')
```
## snakeize(obj)
Convert the key strings in `obj` from camel-case to underscore-stlye recursively.
# install
With [npm](https://npmjs.org) do:
```
npm install snakeize
```
To use in the browser, use [browserify](http://browserify.org) or [component](http://github.com/component):
```
component install nathan7/snakeize
```
# license
MIT

View File

@@ -0,0 +1,36 @@
var test = require('tape');
var snakeize = require('../');
var obj = {
feeFieFoe: 'fum',
beepBoop: [
{ 'abcXyz': 'mno' },
{ 'FooBar': 'baz' },
{ 'CheeseID': 'wensleydale' }
]
};
test('snakeize a nested object', function (t) {
t.plan(1);
var res = snakeize(obj);
t.deepEqual(res, {
"fee_fie_foe": "fum",
"beep_boop": [
{ "abc_xyz": "mno" },
{ "foo_bar": "baz" },
{ "cheese_id": "wensleydale" }
]
});
});
test('date object is not modified', function (t) {
t.plan(1);
var d = new Date();
t.equal(snakeize(d), d);
});
test('regex object is not modified', function (t) {
t.plan(1);
var r = /1234/;
t.equal(snakeize(r), r);
});