0.0.1 • Published 13 years ago

print_r v0.0.1

Weekly downloads
7
License
-
Repository
github
Last release
13 years ago

JavaScript implementation of PHP's favorite function print_r()

example:

var print_r = require('print_r').print_r;

var a = { foo: 1, bar: function () {return 'hi';} };

console.log(print_r(a)); //(object){ // foo:(number)1, // bar:(function)function () {return 'hi';}}

todo:

  • the way it handles array seems to be wrong.
  • write test.
  • tag the version.
  • is there a way to export functions into global easily?
  • is it better to spit to console.log() defaultly as in PHP?
0.0.1

13 years ago