Constructor
new EncLst(str, filepath)
Parameters:
Name | Type | Description |
---|---|---|
str |
string | A string representing the encrust. In case a non-empty filepath is specified, it will be ignored. |
filepath |
string | A string representing the filepath where to read. The param str is ignored if this param is specified. |
- Mixes In:
- Source:
Classes
Members
filepath :string
Filepath where this enclst is saved.
Type:
- string
items :Array.Item
Array of Item objects.
Type:
- Array.Item
title :string
Title of this enclst.
Type:
- string
value :Value
Value object of this enclst.
Type:
Methods
isEnclst()
Is this string for Enclst file name?
- Mixes In:
- Source:
isEnclst()
Is this string for Enclst file name?
- Mixes In:
- Source:
isPath()
Is this Path?
- Mixes In:
- Source:
isPath()
Is this Path?
- Mixes In:
- Source:
isURL()
Is this URL?
- Mixes In:
- Source:
isURL()
Is this URL?
- Mixes In:
- Source:
isYTcontentID()
Is this youtube contents ID?
- Mixes In:
- Source:
isYTcontentID()
Is this youtube contents ID?
- Mixes In:
- Source:
isYTplaylistID()
Is this youtube playlist ID?
- Mixes In:
- Source:
isYTplaylistID()
Is this youtube playlist ID?
- Mixes In:
- Source:
nextFilePath()
Calculate the file path of the next Encrust file.
Return the URL string to get the Enclst file indicated by the parameter path.
Depending on what the parameter path is like, it is evaluated as following:
without v-root
Calculate subsequent URL from the current URL that storeed in the member valuable of this enclst, and a parameter path that indicate a next enclst which is loading.
Retuned nextURL is calculated as joind of the current url and path.
You can optionally specify a base_url, which will be used instead of the current url.
with v-root
Calculate subsequent URL from the current URL that storeed in the member valuable of this enclst, and a parameter path that indicate a next enclst which is loading.
Retuned nextURL is calculated as joind of the current url and path.
You can optionally specify a base_url, which will be used instead of the current url.
Full URL
In the case of the path is the full version of the URL string like a "https:www.a.com/b.enlist" which can be used as the parameter of the HTTP Get for fetching a new enclist file, this function returns the same string of the input parameter path as is.Absolute Path
In the case of the path is the absolute path string start with "/" like a "/b.enlist", return value is depend on the presence of an additional named parameter "v_root" indicating a virtual root.Relative Path
Calculate subsequent URL from the current URL that storeed in the member valuable of this enclst, and a parameter path that indicate a next enclst which is loading. Retuned nextURL is calculated as joind of the current url and path. You can optionally specify a base_url, which will be used instead of the current url.- Mixes In:
- Source:
nextFilePath()
Calculate the file path of the next Encrust file.
Return the URL string to get the Enclst file indicated by the parameter path.
Depending on what the parameter path is like, it is evaluated as following:
without v-root
Calculate subsequent URL from the current URL that storeed in the member valuable of this enclst, and a parameter path that indicate a next enclst which is loading.
Retuned nextURL is calculated as joind of the current url and path.
You can optionally specify a base_url, which will be used instead of the current url.
with v-root
Calculate subsequent URL from the current URL that storeed in the member valuable of this enclst, and a parameter path that indicate a next enclst which is loading.
Retuned nextURL is calculated as joind of the current url and path.
You can optionally specify a base_url, which will be used instead of the current url.
Full URL
In the case of the path is the full version of the URL string like a "https:www.a.com/b.enlist" which can be used as the parameter of the HTTP Get for fetching a new enclist file, this function returns the same string of the input parameter path as is.Absolute Path
In the case of the path is the absolute path string start with "/" like a "/b.enlist", return value is depend on the presence of an additional named parameter "v_root" indicating a virtual root.Relative Path
Calculate subsequent URL from the current URL that storeed in the member valuable of this enclst, and a parameter path that indicate a next enclst which is loading. Retuned nextURL is calculated as joind of the current url and path. You can optionally specify a base_url, which will be used instead of the current url.- Mixes In:
- Source:
pushItem()
push an item to the end.
read()
read enclst string and refresh this
serialize() → {string}
Serialize this enclst object to the Enclst Notation string
Returns:
A serialized Enclst Notation string of this enclst object.
- Type
- string
unshiftItem()
unshift an item to the top.
(async, static) createFromURL()
Static creator by URL string