Skip to content

Commit

Permalink
Update documentation.
Browse files Browse the repository at this point in the history
  • Loading branch information
totherik committed Feb 27, 2014
1 parent 5602a50 commit 715e004
Showing 1 changed file with 9 additions and 12 deletions.
21 changes: 9 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ resolver.use('file', fs.readFile);
json = {
"key": "file:foo/baz.key",
"certs": "path:certs/myapp"
}
};

resolver.resolve(json, function (err, data) {
console.log(data);
Expand All @@ -89,7 +89,6 @@ resolver.resolve(json, function (err, data) {
When registered, handlers return an `unregister` function you can call when you no longer want a handler in the chain.

```javascript
var fs = require('fs');
var path = require('path');
var shortstop = require('shortstop');

Expand All @@ -99,7 +98,7 @@ function resolve(value) {
// Is absolute path already
return value;
}
return path.join(process.cwd(), value;
return path.join(process.cwd(), value);
}

var resolver, unuse, json;
Expand All @@ -115,16 +114,14 @@ resolver.resolve(json, function (err, data) {
// {
// "key": "/path/to/my/foo/baz.key"
// }
});


unuse();

unuse();

resolver.resolve(json, function (err, data) {
console.log(data);
// {
// "key": "path:foo/baz.key"
// }
resolver.resolve(json, function (err, data) {
console.log(data);
// {
// "key": "path:foo/baz.key"
// }
});
});
```

0 comments on commit 715e004

Please sign in to comment.