Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How are modules used #176

Closed
basickarl opened this issue Sep 30, 2015 · 1 comment
Closed

How are modules used #176

basickarl opened this issue Sep 30, 2015 · 1 comment

Comments

@basickarl
Copy link

module.helper.toObjectID(hexStr)

How is the above implemented.

@vkarpov15
Copy link
Contributor

https://github.com/kissjs/node-mongoskin/blob/master/lib/helper.js#L10-L18 . Checks if it's already an object id, and if so, returns it. Then checks for 24 chars and, if so, calls the mongodb driver's ObjectId contructor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants