Skip to content
This repository has been archived by the owner on May 17, 2023. It is now read-only.
/ print_r Public archive

PHP's favorite print_r for JavaScript

Notifications You must be signed in to change notification settings

beatak/print_r

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

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?

About

PHP's favorite print_r for JavaScript

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published