Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Rename example files and documentation

  • Loading branch information...
commit 10d3bf52ba71c6d52bac086f0ce1fce8c39a56bf 1 parent 1bf5eac
@victorcoder authored
View
10 README
@@ -1,10 +0,0 @@
-Tuna is a tool to inspect JavaScript objects. It is a tool to digg in the details of JavaScript object instances that tries to define an 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. Contrary to describeType instead of returning XML object definition it is based on JavaScript objects or JSON objects.
-
-Use
-----------------
-
-Include the main script in your page or require it in your Node script and use
-Tuna.describe(object);
-
View
18 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
+
View
0  test.html → browser-example.html
File renamed without changes
View
9 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",
@@ -19,6 +24,4 @@ var foo = {
}
};
-function algo(param1) {}
-
-console.log(Tuna.describe(foo));
+console.log(Tuna.describe(foo), true, null);
View
9 tuna.js
@@ -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.
@@ -99,3 +102,9 @@ var Tuna = (function() {
}
}
})();
+
+try {
+ exports.Tuna = Tuna;
+} catch(error) {
+
+}
Please sign in to comment.
Something went wrong with that request. Please try again.