Security News
vlt Debuts New JavaScript Package Manager and Serverless Registry at NodeConf EU
vlt introduced its new package manager and a serverless registry this week, innovating in a space where npm has stagnated.
@wixc3/fs-utils
Advanced tools
Function | Description |
---|---|
addRelativePrefix(path) | |
backSlash(str, type) | Ensure a single heading/trailing backslash (/) of a single line string |
createImportPath({ importedFilePath, targetFilePath, targetPackageJsonPath, fs, }) | Returns relative import path if imported and target files are in the same package, otherwise returns a bare import specifier. |
formatToOSpaths(str) | |
getBareImportSpecifier(absoluteImportPath, packageJsonPath, packageJsonName) | Creates bare import specifier for an absolute import path, stripping extension from JS/TS files. |
getDTSPath(filePath) | |
getFullExtname(filePath) | Returns file extension from the first occurrence of the ".", unlike path.extname() which returns from the last occurrence. |
getImportPath(filePath) | |
getPackageJsonPath(filePath, fs) | Gets path to package.json file closest to the given file path. |
getPackageName(dirPath, fs) | Gets package name. |
getPackagePath(filePath, fs) | Gets path to package directory, closest to the given file path. |
getRelativeImportPath(sourceFilePath, filePathToImport) | Creates relative import path for a file, stripping extension from JS/TS files. |
getRelativeModulePath(sourceAbsFilePath, targetAbsFilePath) | |
isDirPath(filePath) | |
isJavaScriptFile(filePath) | |
isJsonFile(filePath) | |
isPathIncludesDir(filePath, directoryName) | Safely checks if a path contains a directory name. |
isRelativeModulePath(path) | |
isRelativeModuleRequest(request) | |
isSubPath(path, basePath, fs) | Checks if a path is equal to or subpath of a given base path. |
isTsOrJS(filePath) | |
isTypeAffectingFileOrDir(filePath) | |
isTypeScriptFile(filePath) | |
isWindowsStyleAbsolutePath(fsPath) | |
pathChainToRoot(currentPath) | |
pathToTrueCase(fs, path) | Returns case-exact absolute form of the path, similar to fs.realpathSync.native() Trailing segments of the path that don't exist are left unchanged. |
readPackageJson(dirPath, fs) | Read and parse a directory's package.json |
rebaseRelativeModulePath(filePath, modulePath) | |
replaceWinSlashes(str) |
Interface | Description |
---|---|
AdjustRelativeImportPathArgs | |
CreateImportPathArgs |
Variable | Description |
---|---|
fileRequestPrefix | prefix for file requests in Language server protocol |
FAQs
Filesystem utils, usable in all environments
We found that @wixc3/fs-utils demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 68 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
vlt introduced its new package manager and a serverless registry this week, innovating in a space where npm has stagnated.
Security News
Research
The Socket Research Team uncovered a malicious Python package typosquatting the popular 'fabric' SSH library, silently exfiltrating AWS credentials from unsuspecting developers.
Security News
At its inaugural meeting, the JSR Working Group outlined plans for an open governance model and a roadmap to enhance JavaScript package management.