
Research
/Security News
Critical Vulnerability in NestJS Devtools: Localhost RCE via Sandbox Escape
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
path-browserify
Advanced tools
The path-browserify npm package is a version of Node.js core path module for the browser. It provides utilities for working with file and directory paths, allowing you to perform operations such as normalization, joining, and resolving paths in a way that is compatible with browser environments.
Normalization
Normalize a string path, taking care of '..' and '.' parts and multiple slashes.
const path = require('path-browserify');
const normalizedPath = path.normalize('/foo/bar//baz/asdf/quux/..');
Joining Paths
Join all arguments together and normalize the resulting path.
const path = require('path-browserify');
const joinedPath = path.join('/foo', 'bar', 'baz/asdf', 'quux', '..');
Resolving Paths
Resolve a sequence of paths or path segments into an absolute path.
const path = require('path-browserify');
const resolvedPath = path.resolve('foo/bar', '/tmp/file/', '..', 'a/../subfile');
Basename
Get the last portion of a path, similar to the Unix basename command.
const path = require('path-browserify');
const base = path.basename('/foo/bar/baz/asdf/quux.html');
Extension Name
Return the extension of the path, from the last occurrence of the '.' (period) character to end of string in the last portion of the path.
const path = require('path-browserify');
const ext = path.extname('index.html');
Directory Name
Return the directory name of a path, similar to the Unix dirname command.
const path = require('path-browserify');
const dir = path.dirname('/foo/bar/baz/asdf/quux');
This is the original Node.js path module itself. It provides the same functionality as path-browserify but is intended for use in Node.js server-side environments rather than the browser.
A plugin for webpack that allows you to use the Node.js path module in browser environments. It is similar to path-browserify but is specifically tailored for integration with webpack's module bundling system.
A path manipulation library that extends the Node.js path module's functionality. It adds features like preserving trailing slashes and normalizing paths to a consistent format, which can be useful in certain situations. It is an alternative to path-browserify with some additional features.
the path module from node core for browsers
FAQs
the path module from node core for browsers
The npm package path-browserify receives a total of 20,170,381 weekly downloads. As such, path-browserify popularity was classified as popular.
We found that path-browserify demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 40 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.
Research
/Security News
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
Product
Customize license detection with Socket’s new license overlays: gain control, reduce noise, and handle edge cases with precision.
Product
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.