renamify

3.0.2 • 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

Dependencies (1)

Dev Dependencies (11)

Package Sidebar

Install

npm i renamify

Weekly Downloads

169

Version

3.0.2

License

MIT

Unpacked Size

6.31 kB

Total Files

5

Last publish

Collaborators

  • coderaiser