Commit 2b8ed0b778ffe06dbf19898b0cdeb8e009224087
make everything 'use strict'
Dominic Tarr committed on 5/19/2016, 8:25:37 PMParent: b97db9e7ed0815998c76014c59a9bfb764eae06d
Files changed
sources/count.js | changed |
sources/empty.js | changed |
sources/error.js | changed |
sources/index.js | changed |
sources/infinite.js | changed |
sources/keys.js | changed |
sources/once.js | changed |
sources/values.js | changed |
sources/count.js | ||
---|---|---|
@@ -1,4 +1,6 @@ | ||
1 | +'use strict' | |
2 | + | |
1 | 3 | module.exports = function count (max) { |
2 | 4 | var i = 0; max = max || Infinity |
3 | 5 | return function (end, cb) { |
4 | 6 | if(end) return cb && cb(end) |
sources/empty.js | ||
---|---|---|
@@ -1,4 +1,5 @@ | ||
1 | +'use strict' | |
1 | 2 | //a stream that ends immediately. |
2 | 3 | module.exports = function empty () { |
3 | 4 | return function (abort, cb) { |
4 | 5 | cb(true) |
sources/error.js | ||
---|---|---|
@@ -1,4 +1,5 @@ | ||
1 | +'use strict' | |
1 | 2 | //a stream that errors immediately. |
2 | 3 | module.exports = function error (err) { |
3 | 4 | return function (abort, cb) { |
4 | 5 | cb(err) |
sources/index.js | ||
---|---|---|
@@ -1,4 +1,5 @@ | ||
1 | +'use strict' | |
1 | 2 | module.exports = { |
2 | 3 | keys: require('./keys'), |
3 | 4 | once: require('./once'), |
4 | 5 | values: require('./values'), |
sources/infinite.js | ||
---|---|---|
@@ -1,4 +1,5 @@ | ||
1 | +'use strict' | |
1 | 2 | module.exports = function infinite (generate) { |
2 | 3 | generate = generate || Math.random |
3 | 4 | return function (end, cb) { |
4 | 5 | if(end) return cb && cb(end) |
sources/keys.js | ||
---|---|---|
@@ -1,4 +1,5 @@ | ||
1 | +'use strict' | |
1 | 2 | var values = require('./values') |
2 | 3 | module.exports = function (object) { |
3 | 4 | return values(Object.keys(object)) |
4 | 5 | } |
Built with git-ssb-web