PageRenderTime 182ms CodeModel.GetById 19ms app.highlight 3ms RepoModel.GetById 0ms app.codeStats 0ms

/node_modules/mongodb/node_modules/bson/lib/bson/index.js

https://bitbucket.org/gagginaspinnata/todo-app-with-angularjs
JavaScript | 74 lines | 64 code | 3 blank | 7 comment | 3 complexity | 6dd9fb285d9fdfe2543fc6654c2d0a91 MD5 | raw file
Possible License(s): Apache-2.0, MIT
 1try {
 2  exports.BSONPure = require('./bson');
 3  exports.BSONNative = require('../../ext');
 4} catch(err) {
 5  // do nothing
 6}
 7
 8[ './binary_parser'
 9  , './binary'
10  , './code'
11  , './db_ref'
12  , './double'
13  , './max_key'
14  , './min_key'
15  , './objectid'
16  , './symbol'
17  , './timestamp'
18  , './long'].forEach(function (path) {
19  	var module = require('./' + path);
20  	for (var i in module) {
21  		exports[i] = module[i];
22    }
23});
24
25// Exports all the classes for the NATIVE JS BSON Parser
26exports.native = function() {
27  var classes = {};
28  // Map all the classes
29  [ './binary_parser'
30    , './binary'
31    , './code'
32    , './db_ref'
33    , './double'
34    , './max_key'
35    , './min_key'
36    , './objectid'
37    , './symbol'
38    , './timestamp'
39    , './long'
40    , '../../ext'
41].forEach(function (path) {
42    	var module = require('./' + path);
43    	for (var i in module) {
44    		classes[i] = module[i];
45      }
46  });
47  // Return classes list
48  return classes;
49}
50
51// Exports all the classes for the PURE JS BSON Parser
52exports.pure = function() {
53  var classes = {};
54  // Map all the classes
55  [ './binary_parser'
56    , './binary'
57    , './code'
58    , './db_ref'
59    , './double'
60    , './max_key'
61    , './min_key'
62    , './objectid'
63    , './symbol'
64    , './timestamp'
65    , './long'
66    , '././bson'].forEach(function (path) {
67    	var module = require('./' + path);
68    	for (var i in module) {
69    		classes[i] = module[i];
70      }
71  });
72  // Return classes list
73  return classes;
74}