Skip to content
Rename group of files from a directory
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
lib
test
.eslintrc
.eslintrc.server
.gitignore
.npmignore
.travis.yml
ChangeLog
LICENSE
README.md
package.json

README.md

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

You can’t perform that action at this time.