Skip to content
This repository has been archived by the owner on Sep 12, 2018. It is now read-only.

cakecatz/prettyput

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Usage

Put var p = require('prettyput') into your source code.

For String,Object,Array...

p.p(obj);
p.pp([str,obj,arr]);

Output is just like console.log.

For Object

var obj =
{
  a:'A',
  b:'B',
  c:{
    d:'D',
    e:{
      f:'F'
    }
  }
}
p.o(obj);

output

{
  a:A
  b:B
  c:{
    d:D
    e:{
      f:F
    }
  }
}

For Array

var arr = [6,4,3,9,5];
p.a(arr);

output

[0] -> 6
[1] -> 4
[2] -> 3
[3] -> 9
[4] -> 5

For Error

p.e(err);

Check err value and output it when err contain some value.

About

Print Object,String,Array into console

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published