# Code coverage report for node-mongoskin/lib/index.js

## Statements: 100% (11 / 11) Branches: 50% (1 / 2) Functions: 100% (1 / 1) Lines: 100% (11 / 11) Ignored: none

All files » node-mongoskin/lib/ » index.js

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37

    1

    1
    25

    1
    6
    6
    6
    6

    1
    1

    1
     /*!
     * mongoskin - index.js
     *
     * Copyright(c) 2011 - 2012 kissjs.org
     * MIT Licensed
     */

    "use strict";

    /**
     * Module dependencies.
     */

    var mongo = require('mongodb');

    /*
     * exports mongo classes ObjectID Long Code DbRef ... to mongoskin
     */
    for (var key in mongo) {
      exports[key] = mongo[key];
    }

    // exports.Foo = SkinFoo;
    ;['mongo_client', 'db', 'collection', 'cursor', 'admin', 'grid_store'].forEach(function(modPath){
        var mod = require('./' + modPath);
        for(var name in mod) {
          Eif(name.indexOf('Skin') == 0) {
            exports[name.substring(4)] = mod[name];
          }
        }
    });

    exports.helper = require('./helper');
    exports.utils = require('./utils');

    exports.db = exports.MongoClient.connect;