Skip to content

Commit

Permalink
Update doc comments
Browse files Browse the repository at this point in the history
  • Loading branch information
corscheid committed Nov 23, 2023
1 parent b1af526 commit 6492aeb
Show file tree
Hide file tree
Showing 11 changed files with 69 additions and 69 deletions.
6 changes: 3 additions & 3 deletions dist/fwew.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { LanguageCode, Word } from './types';
/**
* Search 1 or more words in both directions (Na'vi first)
* @param {LanguageCode} lang language code
* @param {LanguageCode} lang language code ("de" | "en" | "et" | "fr" | "hu" | "nl" | "pl" | "ru" | "sv" | "tr")
* @param {string} words words to search
* @returns {Promise<Word[][]>}
*/
Expand All @@ -14,7 +14,7 @@ declare function search(lang: LanguageCode, words: string): Promise<Word[][]>;
declare function fwew(navi: string): Promise<Word[][]>;
/**
* Search 1 or more words Local -> Na'vi
* @param {LanguageCode} lang language code
* @param {LanguageCode} lang language code ("de" | "en" | "et" | "fr" | "hu" | "nl" | "pl" | "ru" | "sv" | "tr")
* @param {string} local local words to search
* @returns {Promise<Word[][]>}
*/
Expand All @@ -27,7 +27,7 @@ declare function fwewReverse(lang: LanguageCode, local: string): Promise<Word[][
declare function fwew1D(navi: string): Promise<Word[]>;
/**
* Search 1 or more words Local -> Na'vi, return only 1D array
* @param {LanguageCode} lang language code
* @param {LanguageCode} lang language code ("de" | "en" | "et" | "fr" | "hu" | "nl" | "pl" | "ru" | "sv" | "tr")
* @param {string} local local words to search
* @returns {Promise<Word[]>}
*/
Expand Down
34 changes: 17 additions & 17 deletions dist/index.esm.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const endpoints = {

/**
* Search 1 or more words in both directions (Na'vi first)
* @param {LanguageCode} lang language code
* @param {LanguageCode} lang language code ("de" | "en" | "et" | "fr" | "hu" | "nl" | "pl" | "ru" | "sv" | "tr")
* @param {string} words words to search
* @returns {Promise<Word[][]>}
*/
Expand Down Expand Up @@ -50,7 +50,7 @@ async function fwew(navi) {
}
/**
* Search 1 or more words Local -> Na'vi
* @param {LanguageCode} lang language code
* @param {LanguageCode} lang language code ("de" | "en" | "et" | "fr" | "hu" | "nl" | "pl" | "ru" | "sv" | "tr")
* @param {string} local local words to search
* @returns {Promise<Word[][]>}
*/
Expand Down Expand Up @@ -79,7 +79,7 @@ async function fwew1D(navi) {
}
/**
* Search 1 or more words Local -> Na'vi, return only 1D array
* @param {LanguageCode} lang language code
* @param {LanguageCode} lang language code ("de" | "en" | "et" | "fr" | "hu" | "nl" | "pl" | "ru" | "sv" | "tr")
* @param {string} local local words to search
* @returns {Promise<Word[]>}
*/
Expand Down Expand Up @@ -110,7 +110,7 @@ async function fwewSimple(navi) {

/**
* Get a list of all words or Get a list of words filtered by args
* @param {string | undefined} args
* @param {string | undefined} args filter arguments e.g., 'word has kx' or 'word has kx and pos is vin.'
* @returns {Promise<Word[]>}
*/
async function list(args) {
Expand All @@ -124,9 +124,9 @@ async function list(args) {

/**
* Generate a single Na'vi first name
* @param {string} n number of names to generate
* @param {string} s number of syllables per name
* @param {Dialect} dialect dialect to use
* @param {string} n number of names to generate [1-50]
* @param {string} s number of syllables per name [0-4]
* @param {Dialect} dialect dialect to use ('forest' | 'reef')
* @returns {Promise<string>}
*/
async function nameSingle(n, s, dialect) {
Expand All @@ -141,11 +141,11 @@ async function nameSingle(n, s, dialect) {
/**
* Generate a Na'vi full name
* @param {NameEnding} ending 'ite for female, 'itan for male
* @param {string} n number of names to generate
* @param {string} s1 number of syllables in first name
* @param {string} s2 number of syllables in family name
* @param {string} s3 number of syllables in parent's name
* @param {Dialect} dialect dialect to use
* @param {string} n number of names to generate [1-50]
* @param {string} s1 number of syllables in first name [0-4]
* @param {string} s2 number of syllables in family name [0-4]
* @param {string} s3 number of syllables in parent's name [0-4]
* @param {Dialect} dialect dialect to use ('forest' | 'reef')
* @returns {Promise<string>}
*/
async function nameFull(ending, n, s1, s2, s3, dialect) {
Expand All @@ -162,11 +162,11 @@ async function nameFull(ending, n, s1, s2, s3, dialect) {
}
/**
* Generate a Na'vi name with alu
* @param {string} n number of names to generate
* @param {string} s number of syllables in first name
* @param {string} n number of names to generate [1-50]
* @param {string} s number of syllables in first name [0-4]
* @param {NounMode} nm noun mode
* @param {AdjectiveMode} am adjective mode
* @param {Dialect} dialect dialect to use
* @param {Dialect} dialect dialect to use ('forest' | 'reef')
* @returns {Promise<string>}
*/
async function nameAlu(n, s, nm, am, dialect) {
Expand Down Expand Up @@ -205,9 +205,9 @@ async function naviToNumber(word) {
}

/**
* Get given number of random words
* Get given number of random words, optionally filtered by args
* @param {number} n number of random words to get
* @param {string | undefined} args arguments to filter by (e.g., "word has tx")
* @param {string | undefined} args filter arguments e.g., 'word has kx' or 'word has kx and pos is vin.'
* @returns {Promise<Word[]>}
*/
async function random(n, args) {
Expand Down
34 changes: 17 additions & 17 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const endpoints = {

/**
* Search 1 or more words in both directions (Na'vi first)
* @param {LanguageCode} lang language code
* @param {LanguageCode} lang language code ("de" | "en" | "et" | "fr" | "hu" | "nl" | "pl" | "ru" | "sv" | "tr")
* @param {string} words words to search
* @returns {Promise<Word[][]>}
*/
Expand Down Expand Up @@ -52,7 +52,7 @@ async function fwew(navi) {
}
/**
* Search 1 or more words Local -> Na'vi
* @param {LanguageCode} lang language code
* @param {LanguageCode} lang language code ("de" | "en" | "et" | "fr" | "hu" | "nl" | "pl" | "ru" | "sv" | "tr")
* @param {string} local local words to search
* @returns {Promise<Word[][]>}
*/
Expand Down Expand Up @@ -81,7 +81,7 @@ async function fwew1D(navi) {
}
/**
* Search 1 or more words Local -> Na'vi, return only 1D array
* @param {LanguageCode} lang language code
* @param {LanguageCode} lang language code ("de" | "en" | "et" | "fr" | "hu" | "nl" | "pl" | "ru" | "sv" | "tr")
* @param {string} local local words to search
* @returns {Promise<Word[]>}
*/
Expand Down Expand Up @@ -112,7 +112,7 @@ async function fwewSimple(navi) {

/**
* Get a list of all words or Get a list of words filtered by args
* @param {string | undefined} args
* @param {string | undefined} args filter arguments e.g., 'word has kx' or 'word has kx and pos is vin.'
* @returns {Promise<Word[]>}
*/
async function list(args) {
Expand All @@ -126,9 +126,9 @@ async function list(args) {

/**
* Generate a single Na'vi first name
* @param {string} n number of names to generate
* @param {string} s number of syllables per name
* @param {Dialect} dialect dialect to use
* @param {string} n number of names to generate [1-50]
* @param {string} s number of syllables per name [0-4]
* @param {Dialect} dialect dialect to use ('forest' | 'reef')
* @returns {Promise<string>}
*/
async function nameSingle(n, s, dialect) {
Expand All @@ -143,11 +143,11 @@ async function nameSingle(n, s, dialect) {
/**
* Generate a Na'vi full name
* @param {NameEnding} ending 'ite for female, 'itan for male
* @param {string} n number of names to generate
* @param {string} s1 number of syllables in first name
* @param {string} s2 number of syllables in family name
* @param {string} s3 number of syllables in parent's name
* @param {Dialect} dialect dialect to use
* @param {string} n number of names to generate [1-50]
* @param {string} s1 number of syllables in first name [0-4]
* @param {string} s2 number of syllables in family name [0-4]
* @param {string} s3 number of syllables in parent's name [0-4]
* @param {Dialect} dialect dialect to use ('forest' | 'reef')
* @returns {Promise<string>}
*/
async function nameFull(ending, n, s1, s2, s3, dialect) {
Expand All @@ -164,11 +164,11 @@ async function nameFull(ending, n, s1, s2, s3, dialect) {
}
/**
* Generate a Na'vi name with alu
* @param {string} n number of names to generate
* @param {string} s number of syllables in first name
* @param {string} n number of names to generate [1-50]
* @param {string} s number of syllables in first name [0-4]
* @param {NounMode} nm noun mode
* @param {AdjectiveMode} am adjective mode
* @param {Dialect} dialect dialect to use
* @param {Dialect} dialect dialect to use ('forest' | 'reef')
* @returns {Promise<string>}
*/
async function nameAlu(n, s, nm, am, dialect) {
Expand Down Expand Up @@ -207,9 +207,9 @@ async function naviToNumber(word) {
}

/**
* Get given number of random words
* Get given number of random words, optionally filtered by args
* @param {number} n number of random words to get
* @param {string | undefined} args arguments to filter by (e.g., "word has tx")
* @param {string | undefined} args filter arguments e.g., 'word has kx' or 'word has kx and pos is vin.'
* @returns {Promise<Word[]>}
*/
async function random(n, args) {
Expand Down
2 changes: 1 addition & 1 deletion dist/list.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { Word } from './types';
/**
* Get a list of all words or Get a list of words filtered by args
* @param {string | undefined} args
* @param {string | undefined} args filter arguments e.g., 'word has kx' or 'word has kx and pos is vin.'
* @returns {Promise<Word[]>}
*/
export declare function list(args?: string): Promise<Word[]>;
22 changes: 11 additions & 11 deletions dist/names.d.ts
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
import type { AdjectiveMode, Dialect, NameEnding, NounMode } from './types';
/**
* Generate a single Na'vi first name
* @param {string} n number of names to generate
* @param {string} s number of syllables per name
* @param {Dialect} dialect dialect to use
* @param {string} n number of names to generate [1-50]
* @param {string} s number of syllables per name [0-4]
* @param {Dialect} dialect dialect to use ('forest' | 'reef')
* @returns {Promise<string>}
*/
export declare function nameSingle(n: string, s: string, dialect: Dialect): Promise<string>;
/**
* Generate a Na'vi full name
* @param {NameEnding} ending 'ite for female, 'itan for male
* @param {string} n number of names to generate
* @param {string} s1 number of syllables in first name
* @param {string} s2 number of syllables in family name
* @param {string} s3 number of syllables in parent's name
* @param {Dialect} dialect dialect to use
* @param {string} n number of names to generate [1-50]
* @param {string} s1 number of syllables in first name [0-4]
* @param {string} s2 number of syllables in family name [0-4]
* @param {string} s3 number of syllables in parent's name [0-4]
* @param {Dialect} dialect dialect to use ('forest' | 'reef')
* @returns {Promise<string>}
*/
export declare function nameFull(ending: NameEnding, n: string, s1: string, s2: string, s3: string, dialect: string): Promise<string>;
/**
* Generate a Na'vi name with alu
* @param {string} n number of names to generate
* @param {string} s number of syllables in first name
* @param {string} n number of names to generate [1-50]
* @param {string} s number of syllables in first name [0-4]
* @param {NounMode} nm noun mode
* @param {AdjectiveMode} am adjective mode
* @param {Dialect} dialect dialect to use
* @param {Dialect} dialect dialect to use ('forest' | 'reef')
* @returns {Promise<string>}
*/
export declare function nameAlu(n: string, s: string, nm: NounMode, am: AdjectiveMode, dialect: Dialect): Promise<string>;
4 changes: 2 additions & 2 deletions dist/random.d.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import type { Word } from './types';
/**
* Get given number of random words
* Get given number of random words, optionally filtered by args
* @param {number} n number of random words to get
* @param {string | undefined} args arguments to filter by (e.g., "word has tx")
* @param {string | undefined} args filter arguments e.g., 'word has kx' or 'word has kx and pos is vin.'
* @returns {Promise<Word[]>}
*/
export declare function random(n: number, args?: string): Promise<Word[]>;
2 changes: 1 addition & 1 deletion dist/types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export type Dialect = 'forest' | 'reef';
export type NounMode = 'normal noun' | 'verb-er';
export type AdjectiveMode = 'none' | 'any' | 'normal adjective' | 'genitive noun' | 'origin noun' | 'participle verb' | 'active participle verb' | 'passive participle verb';
export type NameEnding = "'ite" | "'itan";
export type LanguageCode = 'DE' | 'EN' | 'ET' | 'FR' | 'HU' | 'NL' | 'PL' | 'RU' | 'SV' | 'TR';
export type LanguageCode = 'de' | 'en' | 'et' | 'fr' | 'hu' | 'nl' | 'pl' | 'ru' | 'sv' | 'tr';
export type LenitionTable = {
kx: string;
px: string;
Expand Down
6 changes: 3 additions & 3 deletions src/fwew.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type { LanguageCode, Word } from './types'

/**
* Search 1 or more words in both directions (Na'vi first)
* @param {LanguageCode} lang language code
* @param {LanguageCode} lang language code ("de" | "en" | "et" | "fr" | "hu" | "nl" | "pl" | "ru" | "sv" | "tr")
* @param {string} words words to search
* @returns {Promise<Word[][]>}
*/
Expand Down Expand Up @@ -32,7 +32,7 @@ async function fwew(navi: string) {

/**
* Search 1 or more words Local -> Na'vi
* @param {LanguageCode} lang language code
* @param {LanguageCode} lang language code ("de" | "en" | "et" | "fr" | "hu" | "nl" | "pl" | "ru" | "sv" | "tr")
* @param {string} local local words to search
* @returns {Promise<Word[][]>}
*/
Expand Down Expand Up @@ -61,7 +61,7 @@ async function fwew1D(navi: string) {

/**
* Search 1 or more words Local -> Na'vi, return only 1D array
* @param {LanguageCode} lang language code
* @param {LanguageCode} lang language code ("de" | "en" | "et" | "fr" | "hu" | "nl" | "pl" | "ru" | "sv" | "tr")
* @param {string} local local words to search
* @returns {Promise<Word[]>}
*/
Expand Down
2 changes: 1 addition & 1 deletion src/list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type { Word } from './types'

/**
* Get a list of all words or Get a list of words filtered by args
* @param {string | undefined} args
* @param {string | undefined} args filter arguments e.g., 'word has kx' or 'word has kx and pos is vin.'
* @returns {Promise<Word[]>}
*/
export async function list(args?: string) {
Expand Down
22 changes: 11 additions & 11 deletions src/names.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import type { AdjectiveMode, Dialect, NameEnding, NounMode } from './types'

/**
* Generate a single Na'vi first name
* @param {string} n number of names to generate
* @param {string} s number of syllables per name
* @param {Dialect} dialect dialect to use
* @param {string} n number of names to generate [1-50]
* @param {string} s number of syllables per name [0-4]
* @param {Dialect} dialect dialect to use ('forest' | 'reef')
* @returns {Promise<string>}
*/
export async function nameSingle(n: string, s: string, dialect: Dialect) {
Expand All @@ -21,11 +21,11 @@ export async function nameSingle(n: string, s: string, dialect: Dialect) {
/**
* Generate a Na'vi full name
* @param {NameEnding} ending 'ite for female, 'itan for male
* @param {string} n number of names to generate
* @param {string} s1 number of syllables in first name
* @param {string} s2 number of syllables in family name
* @param {string} s3 number of syllables in parent's name
* @param {Dialect} dialect dialect to use
* @param {string} n number of names to generate [1-50]
* @param {string} s1 number of syllables in first name [0-4]
* @param {string} s2 number of syllables in family name [0-4]
* @param {string} s3 number of syllables in parent's name [0-4]
* @param {Dialect} dialect dialect to use ('forest' | 'reef')
* @returns {Promise<string>}
*/
export async function nameFull(
Expand All @@ -50,11 +50,11 @@ export async function nameFull(

/**
* Generate a Na'vi name with alu
* @param {string} n number of names to generate
* @param {string} s number of syllables in first name
* @param {string} n number of names to generate [1-50]
* @param {string} s number of syllables in first name [0-4]
* @param {NounMode} nm noun mode
* @param {AdjectiveMode} am adjective mode
* @param {Dialect} dialect dialect to use
* @param {Dialect} dialect dialect to use ('forest' | 'reef')
* @returns {Promise<string>}
*/
export async function nameAlu(
Expand Down
4 changes: 2 additions & 2 deletions src/random.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import { endpoints } from './constants'
import type { Word } from './types'

/**
* Get given number of random words
* Get given number of random words, optionally filtered by args
* @param {number} n number of random words to get
* @param {string | undefined} args arguments to filter by (e.g., "word has tx")
* @param {string | undefined} args filter arguments e.g., 'word has kx' or 'word has kx and pos is vin.'
* @returns {Promise<Word[]>}
*/
export async function random(n: number, args?: string) {
Expand Down

0 comments on commit 6492aeb

Please sign in to comment.