MonoDB JS libraries

38 views Asked by At

I am diving in MongoDB and MapReduce. You known JS language is verbose and not complete. MongoDB has more scarce JS that browers e.g. I just found that there is no "Objects.key" method. I'd like to ask for directions about JS libraries mitigating this boilerplate code for extracting keys, values into arrays and rest tasks with collections.

I tried to google such class of libraries but without any success.

1

There are 1 answers

1
cchamberlain On BEST ANSWER

Your question isn't very clear. The native JavaScript mongodb driver uses a json-like query syntax and the results are standard JavaScript objects and arrays which may be traversed using standard JavaScript. JavaScript by the specification is a very mature language, though often confusing for developers who are not familiar with prototypical inheritance.

If you are looking for a JavaScript utility belt to allow you to work with the results, I'd recommend lodash. If you want to add schemas and other traditional database features, have a look at mongoose. I prefer to use the native driver since you can do more dynamic things with low overhead.