npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

deadorbit

v1.0.0

Published

Polyglot utility to log errors in Node and the browser

Downloads

28

Readme

DeadOrbit

Members of Dead Orbit intend to escape the dying Earth before The Darkness returns, as they've given up on The Traveler and put little faith in The City's ability to hold out against a major attack.

Dead Orbit is a flexible JavaScript utility to log errors in NodeJS and the browser.

Usage

An instance of DeadOrbit is configured with a driver that accepts a standardized error information object and communicates with a logging service, and optionally a processor that can modify or reject the error.

var DeadOrbit = require('deadorbit');
var SentryDriver = require('deadorbit/drivers/sentry');
var BrowserProcessor = require('deadorbit/processors/browserEnv');

var sentryDriver = new SentryDriver({
  server: 'https://sentry.example.com/',
  project: '25',
  key: 'abcde12345'
});
var browserProcessor = new BrowserProcessor();
var deadOrbit = new DeadOrbit(sentryDriver, browserProcessor);

See the drivers directory for more information about the available drivers and the parameters they accept. Likewise, see the processors directory for information about processors.

Errors can be reported by passing an Error instance to the "report" method.

deadOrbit.report(new Error('Test error message'));

The report method also accepts an optional "options" parameter, which can contain the following keys:

  • tags
  • user

Standardized Error Info

A standardized error info object is created by core Dead Orbit code, and is passed to the "process" and "report" methods of processors and drivers.

The standardized error information object can contain the following keys:

  • message The Error's message
  • type The Error's type
  • stacks An array of frame objects
  • user A user object
  • tags An array of custom tags
  • environment An object containing information about the current environment.

A frame object can contain the following keys:

  • fileName The filename for this frame.
  • functionName The function name for this frame.
  • lineNumber The line number for this frame.
  • columnNumber The columne number for this frame.
  • args An array of arguments give to the function of this frame.

Known Issues

  • Drivers have a hard dependency on network communication dependencies. These should be injectable as well. (Milestone: 2.0.0)
  • Sentry driver has poor backwards compatiblity due to the network communication dependency. (Milestone: 2.0.0)
  • Airbrake driver is not yet written. (Milestone: 1.1.0)
  • Project isn't called "dinklebot".