New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

tiny-path-parse

Package Overview
Dependencies
Maintainers
0
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tiny-path-parse

A tiny package for parsing file paths, with the same output as Node@18.19.0's path.parse function.

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
0
Created
Source

Tiny Path Parse

A tiny package for parsing file paths, with the same output as Node@18.19.0's path.parse function.

Install

npm install tiny-path-parse

Usage

import parse from 'tiny-path-parse'; // Implementation depending on the current platform
import posix from 'nanopath/posix'; // Implementation for POSIX paths
import win32 from 'nanopath/win32'; // Implementation for Windows paths

// Let's parse a path with automatic posix/win32 flavor detection, based on process.platform

parse ( '/foo/bar.baz' ); // => { root: '/', dir: '/foo', base: 'bar.baz', name: 'bar', ext: '.baz' }

// Let's parse a path with the posix flavor

parse.posix ( '/foo/bar.baz' ); // => { root: '/', dir: '/foo', base: 'bar.baz', name: 'bar', ext: '.baz' }

// Let's parse a path with the win32 flavor

parse.win32 ( 'C:\\foo\\bar.baz' ); // => { root: 'C:\\', dir: 'C:\\foo', base: 'bar.baz', name: 'bar', ext: '.baz' }

License

MIT © Fabio Spampinato

Keywords

path

FAQs

Package last updated on 09 Mar 2025

Did you know?

Socket

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.

Install

Related posts