Gathering detailed insights and metrics for @stdlib/fs-resolve-parent-path
Gathering detailed insights and metrics for @stdlib/fs-resolve-parent-path
Gathering detailed insights and metrics for @stdlib/fs-resolve-parent-path
Gathering detailed insights and metrics for @stdlib/fs-resolve-parent-path
@stdlib/fs-resolve-parent-path-by
Resolve a path according to a predicate function by walking parent directories.
@stdlib/fs-resolve-parent-path-cli
Resolve a path by walking parent directories.
@taktikorg/unde-animi-omnis
<p align="center"> <a href="https://www.npmjs.com/package/@taktikorg/unde-animi-omnis"><img src="https://img.shields.io/npm/v/@taktikorg/unde-animi-omnis"></a> <a href=""><img src="https://img.shields.io/github/actions/workflow/status/RemiMyrset/@taktikor
@crabas0npm2/sapiente-ullam-assumenda
security holding package
Resolve a path by walking parent directories.
npm install @stdlib/fs-resolve-parent-path
Typescript
Module System
Min. Node Version
Node Version
NPM Version
JavaScript (100%)
Total Downloads
79,040,517
Last Day
91,561
Last Week
463,345
Last Month
2,004,087
Last Year
24,457,571
Apache-2.0 License
2 Stars
70 Commits
3 Watchers
6 Branches
12 Contributors
Updated on Apr 07, 2025
Minified
Minified + Gzipped
Latest Version
0.2.2
Package Id
@stdlib/fs-resolve-parent-path@0.2.2
Unpacked Size
45.41 kB
Size
11.24 kB
File Count
13
NPM Version
8.19.4
Node Version
16.20.2
Published on
Jul 27, 2024
Cumulative downloads
Total Downloads
Last Day
23.3%
91,561
Compared to previous day
Last Week
2.4%
463,345
Compared to previous week
Last Month
3.5%
2,004,087
Compared to previous month
Last Year
-38.8%
24,457,571
Compared to previous year
We believe in a future in which the web is a preferred environment for numerical computation. To help realize this future, we've built stdlib. stdlib is a standard library, with an emphasis on numerical and scientific computation, written in JavaScript (and C) for execution in browsers and in Node.js.
The library is fully decomposable, being architected in such a way that you can swap out and mix and match APIs and functionality to cater to your exact preferences and use cases.
When you use stdlib, you can be absolutely certain that you are using the most thorough, rigorous, well-written, studied, documented, tested, measured, and high-quality code out there.
To join us in bringing numerical computing to the web, get started by checking us out on GitHub, and please consider financially supporting stdlib. We greatly appreciate your continued support!
Resolve a path by walking parent directories.
1npm install @stdlib/fs-resolve-parent-path
1var resolveParentPath = require( '@stdlib/fs-resolve-parent-path' );
Asynchronously resolves a path by walking parent directories.
1resolveParentPath( 'package.json', onPath ); 2 3function onPath( error, path ) { 4 if ( error ) { 5 throw error; 6 } 7 console.log( path ); 8 // => '...' 9}
The function accepts the following options
:
By default, the function begins walking from the current working directory. To specify an alternative directory, set the dir
option.
1var opts = { 2 'dir': __dirname 3}; 4resolveParentPath( 'package.json', opts, onPath ); 5 6function onPath( error, path ) { 7 if ( error ) { 8 throw error; 9 } 10 console.log( path ); 11 // => '...' 12}
Synchronously resolves a path by walking parent directories.
1var path = resolveParentPath.sync( 'package.json' ); 2// returns '...'
The function accepts the same options
as resolveParentPath()
.
null
.path.resolve
. The latter performs string manipulation to generate a full path. This implementation walks parent directories to perform a search, thereby touching the file system. Accordingly, this implementation resolves a real absolute file path and is intended for use when a target's location in a parent directory is unknown relative to a child directory; e.g., when wanting to find a package root from deep within a package directory.1var resolveParentPath = require( '@stdlib/fs-resolve-parent-path' ); 2 3var opts = { 4 'dir': __dirname 5}; 6 7/* Sync */ 8 9var out = resolveParentPath.sync( 'package.json', opts ); 10// returns '...' 11 12out = resolveParentPath.sync( 'non_existent_basename' ); 13// returns null 14 15/* Async */ 16 17resolveParentPath( 'package.json', opts, onPath ); 18resolveParentPath( './../non_existent_path', onPath ); 19 20function onPath( error, path ) { 21 if ( error ) { 22 throw error; 23 } 24 console.log( path ); 25}
@stdlib/fs-resolve-parent-path-cli
: CLI package for use as a command-line utility.@stdlib/fs-resolve-parent-path-by
: resolve a path according to a predicate function by walking parent directories.This package is part of stdlib, a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more.
For more information on the project, filing bug reports and feature requests, and guidance on how to develop stdlib, see the main project repository.
See LICENSE.
Copyright © 2016-2024. The Stdlib Authors.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
no dangerous workflow patterns detected
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
security policy file detected
Details
Reason
dependency not pinned by hash detected -- score normalized to 3
Details
Reason
2 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 1
Reason
Found 0/30 approved changesets -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no SAST tool detected
Details
Reason
branch protection not enabled on development/release branches
Details
Score
Last Scanned on 2025-04-28
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More