UNPKG

es-toolkit

Version:

A state-of-the-art, high-performance JavaScript utility library with a small bundle size and strong type annotations.

15 lines (11 loc) 247 B
'use strict'; Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); function attempt(func) { try { return [null, func()]; } catch (error) { return [error, null]; } } exports.attempt = attempt;