new DefaultJSONFilenameFormatter(optionsopt)
Formats/Parses a file that has the format: itemId.json
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
options |
Object |
<optional> |
Options for use in the formatter |
Extends
Methods
format(itemId) → {String}
Formats the itemId to itemId+delimiter+suffix
Parameters:
Name | Type | Description |
---|---|---|
itemId |
String | The itemId to use |
- Inherited From:
- Implements:
- Source:
Returns:
The formatted string
- Type
- String
isValid(fileName) → {Boolean}
Returns true if the fileName matches the type supported by this FilenameFormmatter
Parameters:
Name | Type | Description |
---|---|---|
fileName |
String | The filename |
- Inherited From:
- Implements:
- Source:
Returns:
True if fileName is a match to endsWith(this._delimiter + this._suffix)
- Type
- Boolean
parse(fileName) → {Array.String}
Parses a filename into [itemId, suffix]
Parameters:
Name | Type | Description |
---|---|---|
fileName |
String | The filename to parse |
- Inherited From:
- Implements:
- Source:
Returns:
Array of itemId and suffix
- Type
- Array.String