1. path-esm
Tree-shakeable node:path polyfill
path-esm
Package: path-esm
Last modified: Fri, 16 Jun 2023 10:23:13 GMT
Version: 1.0.0
License: MIT
Downloads: 292

Install

npm install path-esm
yarn add path-esm

path-esm

The path module from Node.js for browsers, in a tree-shakeable ESM form.

This implements the Node.js path module for environments that do not have it, like browsers.

Install

npm install path-esm

Usage

 import path from 'path'

const filename = 'logo.png';
const logo = path.join('./assets/img', filename);
document.querySelector('#logo').src = logo;

API

See the Node.js path docs. path-esm currently matches the Node.js 10.3 API.
path-esm only implements the POSIX functions, not the win32 ones.

License

MIT

Dependencies

RELATED POST

10 Must-Know Windows Shortcuts That Will Save You Time

10 Must-Know Windows Shortcuts That Will Save You Time

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Navigating AWS Networking: Essential Hacks for Smooth Operation

Navigating AWS Networking: Essential Hacks for Smooth Operation

Achieving Stunning Visuals with Unity's Global Illumination

Achieving Stunning Visuals with Unity's Global Illumination

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code