@mikezimm/fps-core-v7
Version:
Library of reusable core interfaces, types and constants migrated from fps-library-v2
39 lines • 1.68 kB
JavaScript
export const PrepositionWords = {
'en-us': ['has', 'been', 'for', 'the', 'you', 'about', 'with', 'not', 'and', 'was', 'before', 'from', 'this'],
'es': ['', '', '', '', '', '', '', '', '', '', '', ''],
'de-de': ['', '', 'för', '', '', '', '', '', '', '', '', ''],
'fr-fr': ['', '', '', '', '', '', '', '', '', '', '', ''],
'ja': ['', '', '', '', '', '', '', '', '', '', '', ''],
'ch': ['', '', '', '', '', '', '', '', '', '', '', ''],
'ko': ['', '', '', '', '', '', '', '', '', '', '', ''],
'thai': ['', '', '', '', '', '', '', '', '', '', '', ''],
'swe': ['', '', '', '', '', '', '', '', '', '', '', ''],
'ro-ro': ['', '', '', '', '', '', '', '', '', '', '', ''], //Should start on Monday
};
export function globalPrepositionList() {
const allPreps = [];
const keys = Object.keys(PrepositionWords);
keys.map(key => {
const anyPrepositionWords = PrepositionWords;
anyPrepositionWords[key].map((prep) => {
if (prep && allPreps.indexOf(prep) < 0)
allPreps.push(prep);
});
});
return allPreps;
}
export function cleanGlobalPrepositionObj() {
const CleanPrepositionWords = PrepositionWords;
const keys = Object.keys(PrepositionWords);
keys.map(key => {
const anyPrepositionWords = PrepositionWords;
const allPreps = [];
anyPrepositionWords[key].map((prep) => {
if (prep && allPreps.indexOf(prep) < 0)
allPreps.push(prep);
});
CleanPrepositionWords[key] = allPreps;
});
return CleanPrepositionWords;
}
//# sourceMappingURL=excludePrepositions.js.map