Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Rename example files and documentation

  • Loading branch information...
commit 10d3bf52ba71c6d52bac086f0ce1fce8c39a56bf 1 parent 1bf5eac
Victor Castell authored
10 README
... ... @@ -1,10 +0,0 @@
1   -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.
2   -
3   -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.
4   -
5   -Use
6   -----------------
7   -
8   -Include the main script in your page or require it in your Node script and use
9   -Tuna.describe(object);
10   -
18 README.md
Source Rendered
... ... @@ -0,0 +1,18 @@
  1 +Tuna - Common sense JavaScript object introspection
  2 +===
  3 +
  4 +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.
  5 +
  6 +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.
  7 +
  8 +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.
  9 +
  10 +Use
  11 +---
  12 +
  13 +Include the main script in your page or require it in your Node script and use
  14 +
  15 + Tuna.describe(object);
  16 +
  17 +Copyright(c) 2011 Victor Castell victorcoder at gmail.com
  18 +
0  test.html → browser-example.html
File renamed without changes
9 tests.js → node-example.js
... ... @@ -1,3 +1,8 @@
  1 +require.paths.unshift('.');
  2 +var sys = require("sys");
  3 +
  4 +var Tuna = require("tuna").Tuna;
  5 +
1 6 //Samples
2 7 var foo = {
3 8 "bar": "foobar",
@@ -19,6 +24,4 @@ var foo = {
19 24 }
20 25 };
21 26
22   -function algo(param1) {}
23   -
24   -console.log(Tuna.describe(foo));
  27 +console.log(Tuna.describe(foo), true, null);
9 tuna.js
@@ -19,6 +19,9 @@
19 19
20 20 You can use the other methods but they are not of much utility outside the
21 21 scope of the class.
  22 +
  23 + Some code borrowed from:
  24 + https://github.com/ry/node/blob/master/lib/util.js
22 25 */
23 26
24 27 // Wrap in a closure for hiding methods and avoid global variables.
@@ -99,3 +102,9 @@ var Tuna = (function() {
99 102 }
100 103 }
101 104 })();
  105 +
  106 +try {
  107 + exports.Tuna = Tuna;
  108 +} catch(error) {
  109 +
  110 +}

0 comments on commit 10d3bf5

Please sign in to comment.
Something went wrong with that request. Please try again.