Skip to content

Commit

Permalink
chore: remove unused castToBSON method
Browse files Browse the repository at this point in the history
  • Loading branch information
jimlambie committed Jul 19, 2018
1 parent 6fbd014 commit 4feea3b
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -543,21 +543,6 @@ function getSchemaOrParent (key, schema) {
}
}

/**
* Takes object and casts fields to BSON types as per this model's schema
*
* @param {object} obj
* @return undefined
* @api private
*/
// DataStore.prototype.castToBSON = function (obj) {
// // TODO: Do we need to handle casting for all fields, or will `_id` be the only BSON specific type?
// // this is starting to enter ODM land...
// if (typeof obj._id === 'string' && ObjectID.isValid(obj._id) && obj._id.match(/^[a-fA-F0-9]{24}$/)) {
// obj._id = ObjectID.createFromHexString(obj._id)
// }
// }

/**
*
*/
Expand Down

0 comments on commit 4feea3b

Please sign in to comment.