Firebase Update
This commit is contained in:
12
express-server/node_modules/methmeth/index.js
generated
vendored
Normal file
12
express-server/node_modules/methmeth/index.js
generated
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = function (methodName) {
|
||||
var initialArguments = [].slice.call(arguments, 1);
|
||||
|
||||
return function (item) {
|
||||
if (typeof item[methodName] === 'function') {
|
||||
var invokedArguments = [].slice.call(arguments, 1);
|
||||
return item[methodName].apply(item, initialArguments.concat(invokedArguments));
|
||||
}
|
||||
};
|
||||
};
|
20
express-server/node_modules/methmeth/license
generated
vendored
Normal file
20
express-server/node_modules/methmeth/license
generated
vendored
Normal file
@ -0,0 +1,20 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2015 Stephen Sawchuk
|
||||
|
||||
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.
|
65
express-server/node_modules/methmeth/package.json
generated
vendored
Normal file
65
express-server/node_modules/methmeth/package.json
generated
vendored
Normal file
@ -0,0 +1,65 @@
|
||||
{
|
||||
"_from": "methmeth@^1.1.0",
|
||||
"_id": "methmeth@1.1.0",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha1-6AomYY5S9cQiKGG7dIUQvRDikIk=",
|
||||
"_location": "/methmeth",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "methmeth@^1.1.0",
|
||||
"name": "methmeth",
|
||||
"escapedName": "methmeth",
|
||||
"rawSpec": "^1.1.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^1.1.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/@google-cloud/common"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/methmeth/-/methmeth-1.1.0.tgz",
|
||||
"_shasum": "e80a26618e52f5c4222861bb748510bd10e29089",
|
||||
"_spec": "methmeth@^1.1.0",
|
||||
"_where": "D:\\Desktop\\Git\\Firebase\\SmartShopperFirebase\\node_modules\\@google-cloud\\common",
|
||||
"author": {
|
||||
"name": "Stephen Sawchuk",
|
||||
"email": "sawchuk@gmail.com",
|
||||
"url": "http://stephenplusplus.com"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/stephenplusplus/methmeth/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"deprecated": false,
|
||||
"description": "Execute a method out from an object.",
|
||||
"devDependencies": {
|
||||
"mocha": "^2.2.5"
|
||||
},
|
||||
"files": [
|
||||
"index.js",
|
||||
"license"
|
||||
],
|
||||
"homepage": "https://github.com/stephenplusplus/methmeth#readme",
|
||||
"keywords": [
|
||||
"prop",
|
||||
"property",
|
||||
"pluck",
|
||||
"method",
|
||||
"meth",
|
||||
"execute",
|
||||
"array",
|
||||
"iterator"
|
||||
],
|
||||
"license": "MIT",
|
||||
"main": "index.js",
|
||||
"name": "methmeth",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/stephenplusplus/methmeth.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "mocha"
|
||||
},
|
||||
"version": "1.1.0"
|
||||
}
|
72
express-server/node_modules/methmeth/readme.md
generated
vendored
Normal file
72
express-server/node_modules/methmeth/readme.md
generated
vendored
Normal file
@ -0,0 +1,72 @@
|
||||
# methmeth
|
||||
> Call a method on an object in an Array.prototype callback.
|
||||
|
||||
|
||||
```sh
|
||||
$ npm install --save methmeth
|
||||
```
|
||||
```js
|
||||
var meth = require('methmeth');
|
||||
|
||||
var friends = [
|
||||
{
|
||||
name: 'passy',
|
||||
hobby: 'carrots',
|
||||
getInfo: function () {
|
||||
return this.name + ' likes ' + this.hobby;
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'sindre',
|
||||
vehicle: 'unicorn taxi',
|
||||
getInfo: function () {
|
||||
return this.name + ' drives a ' + this.vehicle;
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'addy',
|
||||
invented: 'google *',
|
||||
getInfo: function () {
|
||||
return this.name + ' created ' + this.invented;
|
||||
}
|
||||
}
|
||||
];
|
||||
```
|
||||
|
||||
#### Before
|
||||
```js
|
||||
var myFriends = friends.map(function (item) {
|
||||
return item.getInfo();
|
||||
}).join('\n');
|
||||
// passy likes carrots
|
||||
// sindre drives a unicorn taxi
|
||||
// addy created google *
|
||||
```
|
||||
|
||||
#### After
|
||||
```js
|
||||
friends.map(meth('getInfo')).join('\n');
|
||||
// passy likes carrots
|
||||
// sindre drives a unicorn taxi
|
||||
// addy created google *
|
||||
```
|
||||
|
||||
#### Pre-fill arguments
|
||||
```js
|
||||
var friends = [
|
||||
{
|
||||
name: 'dave',
|
||||
passion: 'dried mango',
|
||||
getInfo: function (emotion) {
|
||||
return this.name + ' loves ' + this.passion + emotion;
|
||||
}
|
||||
}
|
||||
];
|
||||
|
||||
friends.map(meth('getInfo', '!!!!')).join('\n');
|
||||
// dave loves dried mango!!!!
|
||||
```
|
||||
|
||||
#### Related
|
||||
|
||||
- [propprop](https://github.com/stephenplusplus/propprop) - Pluck a property out of an object in an Array.prototype callback.
|
Reference in New Issue
Block a user