new Transcription( [data])
Create a new Transcription
Parameters:
Name | Type | Argument | Default | Description |
---|---|---|---|---|
data |
Map | Object |
<optional> |
{} | The data to use for this Transcription, as either a Map or an Object. |
Example
const transcription = new Transcription({ latin: `hello`, IPA: `hɛˈloʊ`, }); console.log(transcription.get(`ipa`)); // hɛˈloʊ
Extends
- Map
Methods
-
<inner> validateAbbreviation(input)
-
Validates an abbreviation. Throws a type error if the input is not a valid abbreviation.
Parameters:
Name Type Description input
Any The input to validate
-
<inner> validateString(input)
-
Validates a String for Transcription values. Throws a type error if the input is not a String.
Parameters:
Name Type Description input
Any The input to validate