demo___customer_pitch-c4152739-a50b-4b5b-9d4d-0561461666d9.zip-extract/_dependencies/npm/lodash-4.17.20/attempt.js

Path
demo___customer_pitch-c4152739-a50b-4b5b-9d4d-0561461666d9.zip-extract/_dependencies/npm/lodash-4.17.20/attempt.js
Status
scanned
Type
file
Name
attempt.js
Extension
.js
Programming language
JavaScript
Mime type
text/plain
File type
ASCII text
Tag

      
    
Rootfs path

      
    
Size
931 (931 bytes)
MD5
19e70cf06abe437a9d89f18d20210cf9
SHA1
6b981c1f3ff53c572ebd08babf8799c8f118f6f6
SHA256
0931ef61bd9f9ddae6a46067732ee747fe694c5f690c5dc5189588cdef251197
SHA512

      
    
SHA1_git
624d01524d24ebebb8ce49d66fb27600dbf3c94a
Is binary

      
    
Is text
True
Is archive

      
    
Is media

      
    
Is legal

      
    
Is manifest

      
    
Is readme

      
    
Is top level

      
    
Is key file

      
    
attempt.js | 931 bytes |

var apply = require('./_apply'), baseRest = require('./_baseRest'), isError = require('./isError'); /** * Attempts to invoke `func`, returning either the result or the caught error * object. Any additional arguments are provided to `func` when it's invoked. * * @static * @memberOf _ * @since 3.0.0 * @category Util * @param {Function} func The function to attempt. * @param {...*} [args] The arguments to invoke `func` with. * @returns {*} Returns the `func` result or error object. * @example * * // Avoid throwing errors for invalid selectors. * var elements = _.attempt(function(selector) { * return document.querySelectorAll(selector); * }, '>_>'); * * if (_.isError(elements)) { * elements = []; * } */ var attempt = baseRest(function(func, args) { try { return apply(func, undefined, args); } catch (e) { return isError(e) ? e : new Error(e); } }); module.exports = attempt;
Package URL License Primary language
pkg:npm/acme-demo-app@1.0.0 JavaScript
pkg:npm/lodash@4.17.20 mit JavaScript