Code coverage report for lib/env.js

Statements: 100% (4 / 4)      Branches: 42.11% (8 / 19)      Functions: 100% (0 / 0)      Lines: 100% (4 / 4)      Ignored: none     

All files » lib/ » env.js
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23    1           1           1       1        
'use strict';
 
exports.isNode = 'undefined' != typeof process
           && 'object' == typeof module
           && 'object' == typeof global
           && 'function' == typeof Buffer
           && process.argv
 
exports.isMongo = !exports.isNode
           && 'function' == typeof printjson
           && 'function' == typeof ObjectId
           && 'function' == typeof rs
           && 'function' == typeof sh;
 
exports.isBrowser = !exports.isNode
                 && !exports.isMongo
                 && 'undefined' != typeof window;
 
exports.type = exports.isNode ? 'node'
  : exports.isMongo ? 'mongo'
  : exports.isBrowser ? 'browser'
  : 'unknown'