
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
rewrite-ext
Advanced tools
Automatically re-write the destination extension of a filepath based on the source extension. e.g `.coffee` => `.js`. This will only rename the ext, no other path parts are modified.
Automatically re-write the destination extension of a filepath based on the source extension. e.g
.coffee
=>.js
. This will only rename the ext, no other path parts are modified.
Install with npm:
$ npm install --save rewrite-ext
var rewrite = require('rewrite-ext');
Automatically re-write extensions to the mapped extensions from ext-map:
console.log(rewrite('abc.coffee'));
//=> 'abc.js'
console.log(rewrite('abc.less'));
//=> 'abc.css'
Explicitly pass an extension to use:
console.log(rewrite('foo/bar.txt', '.abc'));
//=> 'foo/bar.abc'
rewrite('abc.styl'); //=> 'abc.css'
rewrite('abc.sass'); //=> 'abc.css'
rewrite('abc.scss'); //=> 'abc.css'
rewrite('faux.css'); //=> 'faux.css'
rewrite('abc.swig'); //=> 'abc.html'
rewrite('abc.hbs'); //=> 'abc.html'
rewrite('abc.md'); //=> 'abc.html'
rewrite('abc.tmpl'); //=> 'abc.html'
rewrite('faux.html'); //=> 'faux.html'
rewrite('faux.coffee'); //=> 'faux.js'
path.parse
, parses a filepath into an object. | homepagePull requests and stars are always welcome. For bugs and feature requests, please create an issue.
(This project's readme.md is generated by verb, please don't edit the readme directly. Any changes to the readme must be made in the .verb.md readme template.)
To generate the readme, run the following command:
$ npm install -g verbose/verb#dev verb-generate-readme && verb
Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:
$ npm install && npm test
Jon Schlinkert
Copyright © 2017, Jon Schlinkert. Released under the MIT License.
This file was generated by verb-generate-readme, v0.4.3, on March 22, 2017.
FAQs
Automatically re-write the destination extension of a filepath based on the source extension. e.g `.coffee` => `.js`. This will only rename the ext, no other path parts are modified.
The npm package rewrite-ext receives a total of 4,542 weekly downloads. As such, rewrite-ext popularity was classified as popular.
We found that rewrite-ext 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.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.