mirror of
https://github.com/JonasunderscoreJones/jonas_jones-api.git
synced 2025-10-23 17:19:18 +02:00
16 lines
314 B
JavaScript
16 lines
314 B
JavaScript
'use strict';
|
|
|
|
/**
|
|
* Returns `true` if the given index options have a `text` option.
|
|
*/
|
|
|
|
module.exports = function isTextIndex(indexKeys) {
|
|
let isTextIndex = false;
|
|
for (const key of Object.keys(indexKeys)) {
|
|
if (indexKeys[key] === 'text') {
|
|
isTextIndex = true;
|
|
}
|
|
}
|
|
|
|
return isTextIndex;
|
|
};
|