Skip to content

Commit

Permalink
magical webified version of traverse with require('dnode/web').source()
Browse files Browse the repository at this point in the history
  • Loading branch information
James Halliday committed Aug 1, 2010
1 parent 4cf36f3 commit 0043cd6
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
File renamed without changes.
9 changes: 9 additions & 0 deletions lib/web.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
var fs = require('fs');

// return a special webified version of traverse
exports.source = function () {
return fs.readFileSync(__dirname + '/traverse.js')
.toString()
.replace(/^module\..*/mg, '')
};

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name" : "traverse",
"version" : "0.0.5",
"version" : "0.0.6",
"description" : "Traverse and transform objects by visiting every node on a recursive walk.",
"author" : "James Halliday",
"main" : "traverse",
"main" : "./lib/traverse",
"repository" : {
"type" : "git",
"url" : "http://github.com/substack/js-traverse.git"
Expand Down

0 comments on commit 0043cd6

Please sign in to comment.