npm

Ready to take your JavaScript development to the next level? Meet npm Enterprise - the ultimate in enterprise JavaScript.Learn more »

renamify

3.0.1 • Public • Published

Renamify License NPM version Dependency Status Build Status Coverage Status

Rename group of files from a directory.

Install

npm i renamify --save

API

renamify can be used as a promise:

const renamify = require('renamify');
 
const dir = '/';
const from = [
    'bin'
];
 
const to = [
    'super-bin'
];
 
renamify(dir, from, to)
    .then(console.log)
    .catch(console.error);

Or with es2018 async-await syntax:

const renamify = require('renamify');
const tryToCatch = require('try-to-catch');
 
const dir = '/';
const from = [
    'bin'
];
 
const to = [
    'super-bin'
];
 
const [error] = await tryToCatch(renamify, dir, from, to);
console.log(error || 'done');

Related

  • renamify-cli - CLI rename group of files from a directory.

License

MIT

install

npm i renamify

Downloadsweekly downloads

389

version

3.0.1

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability