mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-06-12 06:21:29 +00:00
Make memory allocators pluggable
This commit is contained in:
@ -82,6 +82,8 @@ export function normalize(path: string, trimExtension: bool = false, separator:
|
||||
|
||||
/** Resolves the specified path to a normalized path relative to the specified origin. */
|
||||
export function resolve(normalizedPath: string, normalizedOrigin: string, separator: CharCode = CharCode.SLASH): string {
|
||||
if (normalizedPath.startsWith("std:"))
|
||||
return normalizedPath;
|
||||
return normalize(dirname(normalizedOrigin, separator) + String.fromCharCode(separator) + normalizedPath);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user