update modules
This commit is contained in:
1
node_modules/try-to-catch/legacy/index.js
generated
vendored
1
node_modules/try-to-catch/legacy/index.js
generated
vendored
@@ -1 +0,0 @@
|
||||
module.exports = require('./try-to-catch')
|
37
node_modules/try-to-catch/legacy/try-to-catch.js
generated
vendored
37
node_modules/try-to-catch/legacy/try-to-catch.js
generated
vendored
@@ -1,37 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); }
|
||||
|
||||
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance"); }
|
||||
|
||||
function _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); }
|
||||
|
||||
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } }
|
||||
|
||||
var success = function success(a) {
|
||||
return [null, a];
|
||||
};
|
||||
|
||||
var fail = function fail(a) {
|
||||
return [a];
|
||||
};
|
||||
|
||||
var noArg = function noArg(f, a) {
|
||||
return function () {
|
||||
return f.apply(void 0, _toConsumableArray(a));
|
||||
};
|
||||
};
|
||||
|
||||
module.exports = function (fn) {
|
||||
check(fn);
|
||||
|
||||
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
||||
args[_key - 1] = arguments[_key];
|
||||
}
|
||||
|
||||
return Promise.resolve().then(noArg(fn, args)).then(success).catch(fail);
|
||||
};
|
||||
|
||||
function check(fn) {
|
||||
if (typeof fn !== 'function') throw Error('fn should be a function!');
|
||||
}
|
24
node_modules/try-to-catch/package.json
generated
vendored
24
node_modules/try-to-catch/package.json
generated
vendored
@@ -1,27 +1,33 @@
|
||||
{
|
||||
"_from": "try-to-catch@^3.0.0",
|
||||
"_args": [
|
||||
[
|
||||
"try-to-catch@3.0.0",
|
||||
"D:\\Projects\\vanillajs-seed"
|
||||
]
|
||||
],
|
||||
"_development": true,
|
||||
"_from": "try-to-catch@3.0.0",
|
||||
"_id": "try-to-catch@3.0.0",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-eIm6ZXwR35jVF8By/HdbbkcaCDTBI5PpCPkejRKrYp0jyf/DbCCcRhHD7/O9jtFI3ewsqo9WctFEiJTS6i+CQA==",
|
||||
"_location": "/try-to-catch",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "try-to-catch@^3.0.0",
|
||||
"raw": "try-to-catch@3.0.0",
|
||||
"name": "try-to-catch",
|
||||
"escapedName": "try-to-catch",
|
||||
"rawSpec": "^3.0.0",
|
||||
"rawSpec": "3.0.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^3.0.0"
|
||||
"fetchSpec": "3.0.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/minify"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/try-to-catch/-/try-to-catch-3.0.0.tgz",
|
||||
"_shasum": "a1903b44d13d5124c54d14a461d22ec1f52ea14b",
|
||||
"_spec": "try-to-catch@^3.0.0",
|
||||
"_where": "D:\\Projects\\siag\\vanillajs-seed\\node_modules\\minify",
|
||||
"_spec": "3.0.0",
|
||||
"_where": "D:\\Projects\\vanillajs-seed",
|
||||
"author": {
|
||||
"name": "coderaiser",
|
||||
"email": "mnemonic.enemy@gmail.com",
|
||||
@@ -30,9 +36,7 @@
|
||||
"bugs": {
|
||||
"url": "https://github.com/coderaiser/try-to-catch/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"dependencies": {},
|
||||
"deprecated": false,
|
||||
"description": "function try-catch wrapper for promises",
|
||||
"devDependencies": {
|
||||
"coveralls": "^3.0.0",
|
||||
|
Reference in New Issue
Block a user