total

Returns true if all members are truthy

npm install total
2 downloads in the last day
10 downloads in the last week
41 downloads in the last month

total

What?

Returns true if all members are truthy

How?

CoffeeScript
total = require 'total'

total [yes, no]
# false

total [no]
# false

total [yes]
# true

total []
# false

total null
# false

total [0, null, false, undefined]
# false
JavaScript
var total = require('total');

total([true, false]);
// false

total([false]);
// false

total([true]);
// true

total([]);
// false

total(null);
// false

total([0, null, false, void 0]);
// false

Why?

Because.

npm loves you