Skip to content

Commit

Permalink
Rename example files and documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Victor Castell committed Feb 7, 2011
1 parent 1bf5eac commit 10d3bf5
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 13 deletions.
10 changes: 0 additions & 10 deletions README

This file was deleted.

18 changes: 18 additions & 0 deletions README.md
@@ -0,0 +1,18 @@
Tuna - Common sense JavaScript object introspection
===

Tuna is a tool to inspect JavaScript objects. It is a tool to digg in the details of JS object instances that tries to define a standard way to visualize the object hierarchy.

The motivation for writing this library is to extend the core JavaScript object inspection capabilities and define a standard way of looking in to instances inspired by AS3 describeType() function and by node.js sys.inspect. Contrary to describeType instead of returning XML object definition it is based on JavaScript objects or JSON objects.

It's similar in many aspects to node's sys.inspect but the output format is a bit different and it's usable outside this environment and inside too.

Use
---

Include the main script in your page or require it in your Node script and use

Tuna.describe(object);

Copyright(c) 2011 Victor Castell victorcoder at gmail.com

File renamed without changes.
9 changes: 6 additions & 3 deletions tests.js → node-example.js
@@ -1,3 +1,8 @@
require.paths.unshift('.');
var sys = require("sys");

var Tuna = require("tuna").Tuna;

//Samples
var foo = {
"bar": "foobar",
Expand All @@ -19,6 +24,4 @@ var foo = {
}
};

function algo(param1) {}

console.log(Tuna.describe(foo));
console.log(Tuna.describe(foo), true, null);
9 changes: 9 additions & 0 deletions tuna.js
Expand Up @@ -19,6 +19,9 @@
You can use the other methods but they are not of much utility outside the
scope of the class.
Some code borrowed from:
https://github.com/ry/node/blob/master/lib/util.js
*/

// Wrap in a closure for hiding methods and avoid global variables.
Expand Down Expand Up @@ -99,3 +102,9 @@ var Tuna = (function() {
}
}
})();

try {
exports.Tuna = Tuna;
} catch(error) {

}

0 comments on commit 10d3bf5

Please sign in to comment.