Skip to content

mpouzko/sobaka

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sobaka JS

🐕🐕🐕 A tiny wrapper that keeps errors from breaking into your app. Woof!

Usage

import { withSobaka } from 'sobaka';

const yourCustomLogger = (e) => {
  console.error(e);
};

const someFunctionThatCanEmitError = function () {
  throw new Error('boom');
};

const guarded = withSobaka(someFunctionThatCanEmitError, yourCustomLogger);

// now call your wrapped function, and it will be safe
guarded();

-- happy coding !

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published