Gathering detailed insights and metrics for pathval
Gathering detailed insights and metrics for pathval
Gathering detailed insights and metrics for pathval
Gathering detailed insights and metrics for pathval
@types/pathval
TypeScript definitions for pathval
selectn
Curried property accessor function that resolves deeply-nested object properties via dot/bracket-notation string path while mitigating TypeErrors via friendly and composable API.
param2path
a tool translate requestparam to pathvalue
npm install pathval
Typescript
Module System
Min. Node Version
Node Version
NPM Version
JavaScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
42 Stars
71 Commits
15 Forks
9 Watchers
32 Branches
14 Contributors
Updated on Jun 25, 2025
Latest Version
2.0.1
Package Id
pathval@2.0.1
Unpacked Size
14.00 kB
Size
4.75 kB
File Count
4
NPM Version
10.9.2
Node Version
22.16.0
Published on
Jun 25, 2025
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
Tool for Object value retrieval given a string path for node and the browser.
Pathval is a module which you can use to retrieve or set an Object's property for a given String
path.
pathval
is available on npm. To install it, type:
$ npm install pathval
You can also use it within the browser; install via npm and use the pathval.js
file found within the download. For example:
1<script src="./node_modules/pathval/pathval.js"></script>
The primary export of pathval
is an object which has the following methods:
hasProperty(object, name)
- Checks whether an object
has name
d property or numeric array index.getPathInfo(object, path)
- Returns an object with info indicating the value of the parent
of that path, the name
of the property we're retrieving and its value
.getPathValue(object, path)
- Retrieves the value of a property at a given path
inside an object
'.setPathValue(object, path, value)
- Sets the value
of a property at a given path
inside an object
and returns the object in which the property has been set.1var pathval = require('pathval');
1var pathval = require('pathval'); 2 3var obj = { prop: 'a value' }; 4pathval.hasProperty(obj, 'prop'); // true
1var pathval = require('pathval'); 2 3var obj = { earth: { country: 'Brazil' } }; 4pathval.getPathInfo(obj, 'earth.country'); // { parent: { country: 'Brazil' }, name: 'country', value: 'Brazil', exists: true }
1var pathval = require('pathval'); 2 3var obj = { earth: { country: 'Brazil' } }; 4pathval.getPathValue(obj, 'earth.country'); // 'Brazil'
1var pathval = require('pathval'); 2 3var obj = { earth: { country: 'Brazil' } }; 4pathval.setPathValue(obj, 'earth.country', 'USA'); 5 6obj.earth.country; // 'USA'
7.2/10
Summary
Prototype pollution in pathval
Affected Versions
< 1.1.1
Patched Versions
1.1.1
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
packaging workflow detected
Details
Reason
Found 8/9 approved changesets -- score normalized to 8
Reason
4 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 3
Reason
dependency not pinned by hash detected -- score normalized to 3
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
60 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-07
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