Skip to content

chrisrng/ie-console-table

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

ie-console-table

This is a way to provide polyfiling for IE browsers to use the console.table functionality that is given in modern web browsers such as Firefox and Chrome.

This allows us to view data in a table layout, takes . There is also an optional 'columns' parameter which takes the form of an array of strings similar to the Chrome console.table.

From the example given by Google Chrome:

function Person(firstName, lastName, age) {
  this.firstName = firstName;
  this.lastName = lastName;
  this.age = age;
}

var family = {};
family.mother = new Person("Susan", "Doyle", 32);
family.father = new Person("John", "Doyle", 33);
family.daughter = new Person("Lily", "Doyle", 5);
family.son = new Person("Mike", "Doyle", 8);

console.ietable(family, ["firstName", "lastName", "age"]);

We get:

index | firstName | lastName | age
mother | Susan | Doyle | 32
father | John | Doyle | 33
daughter | Lily | Doyle | 5
son | Mike | Doyle | 8 

Similar to:

google.PNG

About

Provides polyfilling for console.table in IE browsers

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published