How to use the monk/node_modules/mongoskin.ObjectID function in monk

To help you get started, we’ve selected a few monk examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github vadimdemedes / mongorito / lib / util.js View on Github external
'use strict';

/**
 * Dependencies
 */

const ObjectID = require('monk/node_modules/mongoskin').ObjectID;


/**
 * Expose utilities
 */

exports.isObjectID = isObjectID;


/**
 * Utilities
 */

function isObjectID (value) {
  return !!(value && value.constructor === ObjectID);
}
github vadimdemedes / mongorito / src / util.js View on Github external
'use strict';

/**
 * Dependencies
 */

const ObjectID = require('monk/node_modules/mongoskin').ObjectID;


/**
 * Expose utilities
 */

exports.isObjectID = isObjectID;


/**
 * Utilities
 */

function isObjectID (value) {
  return !!(value && value.constructor === ObjectID);
}
github vadimdemedes / mongorito / build / mongorito.js View on Github external
"use strict";

var _slicedToArray = function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { var _arr = []; for (var _iterator = arr[Symbol.iterator](), _step; !(_step = _iterator.next()).done;) { _arr.push(_step.value); if (i && _arr.length === i) break; } return _arr; } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } };

var _prototypeProperties = function (child, staticProps, instanceProps) { if (staticProps) Object.defineProperties(child, staticProps); if (instanceProps) Object.defineProperties(child.prototype, instanceProps); };

var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } };

/**
* Dependencies
*/

var ObjectID = require("monk/node_modules/mongoskin").ObjectID;
var Class = require("class-extend");

var pluralize = require("pluralize");
var compose = require("koa-compose");
var result = require("lodash.result");
var monk = require("monk");
var wrap = require("co-monk");
var util = require("./util");
var is = require("is_js");


/**
* Mongorito
*
* Main class, manages mongodb connection and collections
*/

monk

The wise MongoDB API

MIT
Latest version published 4 years ago

Package Health Score

54 / 100
Full package analysis