Sha256: 99f4aac192df066441e7cede94a50a3c541e31ddd941297b8fac78517228a11b

Contents?: true

Size: 257 Bytes

Versions: 5

Compression:

Stored size: 257 Bytes

Contents

// tryit
// Simple, re-usuable try-catch, this is a performance optimization
// and provides a cleaner API.
module.exports = function (fn, cb) {
    var err;

    try {
        fn();
    } catch (e) {
        err = e;
    }

    if (cb) cb(err || null);
};

Version data entries

5 entries across 5 versions & 3 rubygems

Version Path
guard-sass-lint-0.1.2 node_modules/tryit/tryit.js
guard-sass-lint-0.1.1 node_modules/tryit/tryit.js
lanes-0.8.0 node_modules/tryit/tryit.js
eslint_node_modules-1.6.0.1 vendor/node_modules/eslint/node_modules/is-resolvable/node_modules/tryit/tryit.js
eslint_node_modules-1.6.0 vendor/node_modules/eslint/node_modules/is-resolvable/node_modules/tryit/tryit.js