Firebase Update

This commit is contained in:
Lukas Nowy
2018-12-22 23:30:39 +01:00
parent befb44764d
commit acffe619b3
11523 changed files with 1614327 additions and 930246 deletions

View File

@ -0,0 +1,44 @@
'use strict';
var captureStackTrace = require('capture-stack-trace');
function inherits(ctor, superCtor) {
ctor.super_ = superCtor;
ctor.prototype = Object.create(superCtor.prototype, {
constructor: {
value: ctor,
enumerable: false,
writable: true,
configurable: true
}
});
}
module.exports = function createErrorClass(className, setup) {
if (typeof className !== 'string') {
throw new TypeError('Expected className to be a string');
}
if (/[^0-9a-zA-Z_$]/.test(className)) {
throw new Error('className contains invalid characters');
}
setup = setup || function (message) {
this.message = message;
};
var ErrorClass = function () {
Object.defineProperty(this, 'name', {
configurable: true,
value: className,
writable: true
});
captureStackTrace(this, this.constructor);
setup.apply(this, arguments);
};
inherits(ErrorClass, Error);
return ErrorClass;
};

21
express-server/node_modules/create-error-class/license generated vendored Normal file
View File

@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) Vsevolod Strukchinsky <floatdrop@gmail.com> (github.com/floatdrop)
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,61 @@
{
"_from": "create-error-class@^3.0.2",
"_id": "create-error-class@3.0.2",
"_inBundle": false,
"_integrity": "sha1-Br56vvlHo/FKMP1hBnHUAbyot7Y=",
"_location": "/create-error-class",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "create-error-class@^3.0.2",
"name": "create-error-class",
"escapedName": "create-error-class",
"rawSpec": "^3.0.2",
"saveSpec": null,
"fetchSpec": "^3.0.2"
},
"_requiredBy": [
"/@google-cloud/common",
"/@google-cloud/storage"
],
"_resolved": "https://registry.npmjs.org/create-error-class/-/create-error-class-3.0.2.tgz",
"_shasum": "06be7abef947a3f14a30fd610671d401bca8b7b6",
"_spec": "create-error-class@^3.0.2",
"_where": "D:\\Desktop\\Git\\Firebase\\SmartShopperFirebase\\node_modules\\@google-cloud\\storage",
"author": {
"name": "Vsevolod Strukchinsky",
"email": "floatdrop@gmail.com",
"url": "github.com/floatdrop"
},
"bugs": {
"url": "https://github.com/floatdrop/create-error-class/issues"
},
"bundleDependencies": false,
"dependencies": {
"capture-stack-trace": "^1.0.0"
},
"deprecated": false,
"description": "Create Error classes",
"devDependencies": {
"mocha": "*"
},
"engines": {
"node": ">=0.10.0"
},
"files": [
"index.js"
],
"homepage": "https://github.com/floatdrop/create-error-class#readme",
"keywords": [],
"license": "MIT",
"name": "create-error-class",
"repository": {
"type": "git",
"url": "git+https://github.com/floatdrop/create-error-class.git"
},
"scripts": {
"test": "mocha"
},
"version": "3.0.2"
}

View File

@ -0,0 +1,54 @@
# create-error-class [![Build Status](https://travis-ci.org/floatdrop/create-error-class.svg?branch=master)](https://travis-ci.org/floatdrop/create-error-class)
> Create error class
## Install
```
$ npm install --save create-error-class
```
## Usage
```js
var createErrorClass = require('create-error-class');
var HTTPError = createErrorClass('HTTPError', function (props) {
this.message = 'Status code is ' + props.statusCode;
});
throw new HTTPError({statusCode: 404});
```
## API
### createErrorClass(className, [setup])
Return constructor of Errors with `className`.
#### className
*Required*
Type: `string`
Class name of Error Object. Should contain characters from `[0-9a-zA-Z_$]` range.
#### setup
Type: `function`
Setup function, that will be called after each Error object is created from constructor with context of Error object.
By default `setup` function sets `this.message` as first argument:
```js
var MyError = createErrorClass('MyError');
new MyError('Something gone wrong!').message; // => 'Something gone wrong!'
```
## License
MIT © [Vsevolod Strukchinsky](http://github.com/floatdrop)