Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

using travis, s/Chainsaw/chainsaw/

  • Loading branch information...
commit a88c8f20a343b7cabc903d5ede15632d348e941f 1 parent 3c74751
James Halliday authored
4 .travis.yml
... ... @@ -0,0 +1,4 @@
  1 +language: node_js
  2 +node_js:
  3 + - 0.4
  4 + - 0.6
22 README.markdown
Source Rendered
... ... @@ -1,13 +1,15 @@
1   -Chainsaw
  1 +chainsaw
2 2 ========
3 3
4 4 Build chainable fluent interfaces the easy way in node.js.
5 5
  6 +[![build status](https://secure.travis-ci.org/substack/node-chainsaw.png)](http://travis-ci.org/substack/node-chainsaw)
  7 +
6 8 With this meta-module you can write modules with chainable interfaces.
7 9 Chainsaw takes care of all of the boring details and makes nested flow control
8 10 super simple too.
9 11
10   -Just call `Chainsaw` with a constructor function like in the examples below.
  12 +Just call `chainsaw` with a constructor function like in the examples below.
11 13 In your methods, just do `saw.next()` to move along to the next event and
12 14 `saw.nest()` to create a nested chain.
13 15
@@ -21,10 +23,10 @@ add_do.js
21 23
22 24 This silly example adds values with a chainsaw.
23 25
24   - var Chainsaw = require('chainsaw');
  26 + var chainsaw = require('chainsaw');
25 27
26 28 function AddDo (sum) {
27   - return Chainsaw(function (saw) {
  29 + return chainsaw(function (saw) {
28 30 this.add = function (n) {
29 31 sum += n;
30 32 saw.next();
@@ -56,14 +58,14 @@ prompt.js
56 58 This example provides a wrapper on top of stdin with the help of
57 59 [node-lazy](https://github.com/pkrumins/node-lazy) for line-processing.
58 60
59   - var Chainsaw = require('chainsaw');
60   - var Lazy = require('lazy');
  61 + var chainsaw = require('chainsaw');
  62 + var lazy = require('lazy');
61 63
62 64 module.exports = Prompt;
63 65 function Prompt (stream) {
64 66 var waiting = [];
65 67 var lines = [];
66   - var lazy = Lazy(stream).lines.map(String)
  68 + var lazy = lazy(stream).lines.map(String)
67 69 .forEach(function (line) {
68 70 if (waiting.length) {
69 71 var w = waiting.shift();
@@ -74,7 +76,7 @@ This example provides a wrapper on top of stdin with the help of
74 76 ;
75 77
76 78 var vars = {};
77   - return Chainsaw(function (saw) {
  79 + return chainsaw(function (saw) {
78 80 this.getline = function (f) {
79 81 var g = function (line) {
80 82 saw.nest(f, line, vars);
@@ -153,7 +155,7 @@ consume a tremendous amount of memory, so we also offer a "light" mode
153 155 where actions are not recorded and the aforementioned methods are
154 156 disabled.
155 157
156   -To enable light mode simply use `Chainsaw.light()` to construct your
157   -saw, instead of `Chainsaw()`.
  158 +To enable light mode simply use `chainsaw.light()` to construct your
  159 +saw, instead of `chainsaw()`.
158 160
159 161
4 examples/add_do.js
... ... @@ -1,7 +1,7 @@
1   -var Chainsaw = require('chainsaw');
  1 +var chainsaw = require('chainsaw');
2 2
3 3 function AddDo (sum) {
4   - return Chainsaw(function (saw) {
  4 + return chainsaw(function (saw) {
5 5 this.add = function (n) {
6 6 sum += n;
7 7 saw.next();
4 examples/prompt.js
... ... @@ -1,4 +1,4 @@
1   -var Chainsaw = require('chainsaw');
  1 +var chainsaw = require('chainsaw');
2 2 var Lazy = require('lazy');
3 3
4 4 module.exports = Prompt;
@@ -16,7 +16,7 @@ function Prompt (stream) {
16 16 ;
17 17
18 18 var vars = {};
19   - return Chainsaw(function (saw) {
  19 + return chainsaw(function (saw) {
20 20 this.getline = function (f) {
21 21 var g = function (line) {
22 22 saw.nest(f, line, vars);

0 comments on commit a88c8f2

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