
Product
Rust Support in Socket Is Now Generally Available
Socket’s Rust and Cargo support is now generally available, providing dependency analysis and supply chain visibility for Rust projects.
rename-path
Advanced tools

Return a mapped dest for a src a filepath.
Install with npm:
npm i rename-path --save-dev
var rename = require('rename-paths');
var filepath = 'a/b/c.js';
console.log(rename(filepath, {ext: '.min.js'}));
//=> 'a/b/c.min.js'
console.log(rename(filepath, {destBase: 'dist', ext: '.min.js'}));
//=> 'dist/a/b/c.min.js'
console.log(rename(filepath, {flatten: true, ext: '.min.js'}));
//=> 'c.min.js'
See the tests for more examples.
In the command line, run:
mocha
Jon Schlinkert
Copyright (c) 2014 Jon Schlinkert, contributors.
Released under the MIT license
This file was generated by verb-cli on June 28, 2014.
FAQs
Return a mapped dest for a src a filepath.
The npm package rename-path receives a total of 4 weekly downloads. As such, rename-path popularity was classified as not popular.
We found that rename-path demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.

Product
Socket’s Rust and Cargo support is now generally available, providing dependency analysis and supply chain visibility for Rust projects.

Security News
Chrome 144 introduces the Temporal API, a modern approach to date and time handling designed to fix long-standing issues with JavaScript’s Date object.

Research
Five coordinated Chrome extensions enable session hijacking and block security controls across enterprise HR and ERP platforms.