Sindbad~EG File Manager

Current Path : /home/infinitibizsol/.trash/node_modules.9/mongoose/lib/helpers/indexes/
Upload File :
Current File : /home/infinitibizsol/.trash/node_modules.9/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;
  }
};

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists