Skip to content
This repository has been archived by the owner on Oct 24, 2023. It is now read-only.

Commit

Permalink
Add and for logical testing
Browse files Browse the repository at this point in the history
  • Loading branch information
mstade committed Jan 31, 2015
1 parent fa7b133 commit a22e94d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
module.exports =
{ apply : require('./lib/apply')
{ and : require('./lib/and')
, apply : require('./lib/apply')
, assert : require('./lib/assert')
, call : require('./lib/call')
, compose : require('./lib/compose')
Expand Down
2 changes: 1 addition & 1 deletion lib/and.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module.exports = require('./variadic')(and)

function and(x, rest) {
if (isEmpty(arguments)) return true
if (x === undefined && isEmpty(rest)) return true

var result = val(x)

Expand Down
2 changes: 1 addition & 1 deletion test/and.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const constantly = require('../lib/constantly')
, expect = require('chai').expect
, expect = require('must')
, and = require('../lib/and')

describe('`and`', function() {
Expand Down

0 comments on commit a22e94d

Please sign in to comment.