UNPKG

@technobuddha/library

Version:
20 lines (19 loc) 794 B
declare type Options = { /** only return the indefinite article, do not combine with the input */ only?: boolean; }; /** * Determine the appropriate indefinite article to use with a word. * * @remarks The answer is derived from a simple rules engine, it attempts to cover most exceptions * to the rules, but the English language has lots of quirks, and this rules engine can not cover them * all * * @param word The word * @param __namedParameters see {@link Options} * @default only false * @returns The appropriate indefinite article ("a" or "an") combined with the input word. If the only * option is used, only the indefinite article is returned. */ export declare function indefiniteArticle(word: string, { only }?: Options): string; export default indefiniteArticle;