@@ -59,25 +59,25 @@ const REMOVE_OPTS_DEFAULTS = {}
5959 *
6060 * @example
6161 * // Use Container instead of DataStore on the server
62- * import {Container} from 'js-data'
63- * import MongoDBAdapter from 'js-data-mongodb'
62+ * import { Container } from 'js-data';
63+ * import MongoDBAdapter from 'js-data-mongodb';
6464 *
6565 * // Create a store to hold your Mappers
6666 * const store = new Container({
6767 * mapperDefaults: {
6868 * // MongoDB uses "_id" as the primary key
6969 * idAttribute: '_id'
7070 * }
71- * })
71+ * });
7272 *
7373 * // Create an instance of MongoDBAdapter with default settings
74- * const adapter = new MongoDBAdapter()
74+ * const adapter = new MongoDBAdapter();
7575 *
7676 * // Mappers in "store" will use the MongoDB adapter by default
77- * store.registerAdapter('mongodb', adapter, { default: true })
77+ * store.registerAdapter('mongodb', adapter, { default: true });
7878 *
7979 * // Create a Mapper that maps to a "user" collection
80- * store.defineMapper('user')
80+ * store.defineMapper('user');
8181 *
8282 * @class MongoDBAdapter
8383 * @extends Adapter
@@ -991,8 +991,8 @@ Adapter.extend({
991991 * Details of the current version of the `js-data-mongodb` module.
992992 *
993993 * @example
994- * import {version} from 'js-data-mongodb'
995- * console.log(version.full)
994+ * import { version } from 'js-data-mongodb';
995+ * console.log(version.full);
996996 *
997997 * @name module:js-data-mongodb.version
998998 * @type {object }
@@ -1011,8 +1011,8 @@ export const version = '<%= version %>'
10111011 * {@link MongoDBAdapter } class.
10121012 *
10131013 * @example
1014- * import {MongoDBAdapter} from 'js-data-mongodb'
1015- * const adapter = new MongoDBAdapter()
1014+ * import { MongoDBAdapter } from 'js-data-mongodb';
1015+ * const adapter = new MongoDBAdapter();
10161016 *
10171017 * @name module:js-data-mongodb.MongoDBAdapter
10181018 * @see MongoDBAdapter
@@ -1023,61 +1023,61 @@ export const version = '<%= version %>'
10231023 * Registered as `js-data-mongodb` in NPM.
10241024 *
10251025 * @example <caption>Install from NPM</caption>
1026- * npm i --save js-data-mongodb@rc js-data@rc mongodb bson
1026+ * npm i --save js-data-mongodb js-data mongodb bson
10271027 *
10281028 * @example <caption>Load via CommonJS</caption>
1029- * var MongoDBAdapter = require('js-data-mongodb').MongoDBAdapter
1030- * var adapter = new MongoDBAdapter()
1029+ * const MongoDBAdapter = require('js-data-mongodb').MongoDBAdapter;
1030+ * const adapter = new MongoDBAdapter();
10311031 *
10321032 * @example <caption>Load via ES2015 Modules</caption>
1033- * import {MongoDBAdapter} from 'js-data-mongodb'
1034- * const adapter = new MongoDBAdapter()
1033+ * import { MongoDBAdapter } from 'js-data-mongodb';
1034+ * const adapter = new MongoDBAdapter();
10351035 *
10361036 * @module js-data-mongodb
10371037 */
10381038
1039- /**
1039+ /**
10401040 * Create a subclass of this MongoDBAdapter:
10411041 * @example <caption>MongoDBAdapter.extend</caption>
1042- * // Normally you would do: import { MongoDBAdapter } from 'js-data-mongodb'
1043- * const JSDataMongoDB = require('js-data-mongodb')
1044- * const { MongoDBAdapter } = JSDataMongoDB
1045- * console.log('Using JSDataMongoDB v' + JSDataMongoDB.version.full)
1042+ * // Normally you would do: import { MongoDBAdapter } from 'js-data-mongodb';
1043+ * const JSDataMongoDB = require('js-data-mongodb');
1044+ * const { MongoDBAdapter } = JSDataMongoDB;
1045+ * console.log('Using JSDataMongoDB v' + JSDataMongoDB.version.full);
10461046 *
10471047 * // Extend the class using ES2015 class syntax.
10481048 * class CustomMongoDBAdapterClass extends MongoDBAdapter {
1049- * foo () { return 'bar' }
1050- * static beep () { return 'boop' }
1049+ * foo () { return 'bar'; }
1050+ * static beep () { return 'boop'; }
10511051 * }
1052- * const customMongoDBAdapter = new CustomMongoDBAdapterClass()
1053- * console.log(customMongoDBAdapter.foo())
1054- * console.log(CustomMongoDBAdapterClass.beep())
1052+ * const customMongoDBAdapter = new CustomMongoDBAdapterClass();
1053+ * console.log(customMongoDBAdapter.foo());
1054+ * console.log(CustomMongoDBAdapterClass.beep());
10551055 *
10561056 * // Extend the class using alternate method.
10571057 * const OtherMongoDBAdapterClass = MongoDBAdapter.extend({
1058- * foo () { return 'bar' }
1058+ * foo () { return 'bar'; }
10591059 * }, {
1060- * beep () { return 'boop' }
1061- * })
1062- * const otherMongoDBAdapter = new OtherMongoDBAdapterClass()
1063- * console.log(otherMongoDBAdapter.foo())
1064- * console.log(OtherMongoDBAdapterClass.beep())
1060+ * beep () { return 'boop'; }
1061+ * });
1062+ * const otherMongoDBAdapter = new OtherMongoDBAdapterClass();
1063+ * console.log(otherMongoDBAdapter.foo());
1064+ * console.log(OtherMongoDBAdapterClass.beep());
10651065 *
10661066 * // Extend the class, providing a custom constructor.
10671067 * function AnotherMongoDBAdapterClass () {
1068- * MongoDBAdapter.call(this)
1069- * this.created_at = new Date().getTime()
1068+ * MongoDBAdapter.call(this);
1069+ * this.created_at = new Date().getTime();
10701070 * }
10711071 * MongoDBAdapter.extend({
10721072 * constructor: AnotherMongoDBAdapterClass,
1073- * foo () { return 'bar' }
1073+ * foo () { return 'bar'; }
10741074 * }, {
1075- * beep () { return 'boop' }
1076- * })
1077- * const anotherMongoDBAdapter = new AnotherMongoDBAdapterClass()
1078- * console.log(anotherMongoDBAdapter.created_at)
1079- * console.log(anotherMongoDBAdapter.foo())
1080- * console.log(AnotherMongoDBAdapterClass.beep())
1075+ * beep () { return 'boop'; }
1076+ * });
1077+ * const anotherMongoDBAdapter = new AnotherMongoDBAdapterClass();
1078+ * console.log(anotherMongoDBAdapter.created_at);
1079+ * console.log(anotherMongoDBAdapter.foo());
1080+ * console.log(AnotherMongoDBAdapterClass.beep());
10811081 *
10821082 * @method MongoDBAdapter.extend
10831083 * @param {object } [props={}] Properties to add to the prototype of the
0 commit comments