Skip to content

larsrc/what-js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 

Repository files navigation

what-js

A (mainly) debugging library in an eloquent style.

function(foo, bar) {
  if (foo == bar) {
    what.happenedHere("Should never have foo ", foo, " equal bar ", bar);
  }
  if (bar == 0) {
    what.theFuck("I _know_ I checked for bar == 0 before calling.");
  }
  if (foo < 0) {
    what.isThisIDontEven("Negative foo: ", foo);
  }
  switch (foo) {
    case 1: return 'this';
    case 2: return 'that';
    default: what.toDo("When foo is neither 1 nor 2, but ", foo);
  }
  what.amIDoingHere("This shouldn't be reachable.");
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published