Imports
loreline.Imports (Class)
Static Members
True if path ends with .lor.txt (case-insensitive on letters).
| Name | Type |
|---|---|
path |
String |
| Returns |
|---|
| Bool |
True if path ends with .lor (but not .lor.txt).
| Name | Type |
|---|---|
path |
String |
| Returns |
|---|
| Bool |
Returns the canonical Loreline extension for a path: .lor.txt if the path
ends with that, otherwise .lor (also returned for paths with no Loreline
extension at all. Matches the fallback used elsewhere).
| Name | Type |
|---|---|
path |
String |
| Returns |
|---|
| String |
True if path ends with .lor or .lor.txt.
| Name | Type |
|---|---|
path |
String |
| Returns |
|---|
| Bool |
Strips the Loreline extension from a path. Removes .lor.txt if present,
otherwise removes .lor if present, otherwise returns the path unchanged.
| Name | Type |
|---|---|
path |
String |
| Returns |
|---|
| String |
Instance Members
autoAddExtension: Boolresolve(rootPath: String, tokens: Tokens, handleFile: ImportsFileHandler, handleError: ImportsErrorHandler, done: ImportsCallback): Void| Name | Type |
|---|---|
rootPath |
String |
tokens |
Tokens |
handleFile |
ImportsFileHandler |
handleError |
ImportsErrorHandler |
done |
ImportsCallback |
new(): VoidPrivate Members
handleFile: ImportsFileHandlerhandleError: ImportsErrorHandlertokens: TokensrootPath: StringresolvedImports: Mapdone: ImportsCallbackhasErrors: BoolpendingImports: Intext: StringReturns true if c matches lowerExpected (lowercase ASCII letter) case-insensitively.
| Name | Type |
|---|---|
c |
Int |
lowerExpected |
Int |
| Returns |
|---|
| Bool |
| Name | Type |
|---|---|
toImport |
Array<String> |
visitedImports |
Map |
resolvedImports |
Map |
handleItemInLoop(item: String, loopInfo: loreline._Imports.ImportsLoopInfo, toImport: Array<String>, visitedImports: Map, resolvedImports: Map): Void| Name | Type |
|---|---|
item |
String |
loopInfo |
loreline._Imports.ImportsLoopInfo |
toImport |
Array<String> |
visitedImports |
Map |
resolvedImports |
Map |
| Name | Type |
|---|---|
cwd |
String |
tokens |
Tokens |
toImport |
Array<String> |
visitedImports |
Map |