| Current Path : /home/deltalab/PMS/ims-connector/node_modules/mongoose/lib/helpers/indexes/ |
| Current File : //home/deltalab/PMS/ims-connector/node_modules/mongoose/lib/helpers/indexes/applySchemaCollation.js |
'use strict';
const isTextIndex = require('./isTextIndex');
module.exports = function applySchemaCollation(indexKeys, indexOptions, schemaOptions) {
if (isTextIndex(indexKeys)) {
return;
}
if (schemaOptions.hasOwnProperty('collation') && !indexOptions.hasOwnProperty('collation')) {
indexOptions.collation = schemaOptions.collation;
}
};