@sparklink-pro/apant
Version:
Apollo & Antd tools
23 lines • 611 B
JavaScript
import pluralize from 'pluralize';
const name = (type, count = 1) => `${count === 1 ? type : pluralize(type)}`;
const article = (type, plural = false) => {
if (plural) {
return '';
}
const baseName = name(type);
if (baseName.startsWith('a') ||
baseName.startsWith('e') ||
baseName.startsWith('i') ||
baseName.startsWith('o') ||
baseName.startsWith('u')) {
return 'an';
}
return 'a';
};
export const TypeTranslatorEn = {
name,
article,
pastParticiple: () => '',
};
export default TypeTranslatorEn;
//# sourceMappingURL=en.js.map