Newton's Poleless Magnet

    aster-rename-ids

    1.1.1 • Public • Published

    aster-rename-ids

    NPM version Build Status

    Rename ids with aster.

    Usage

    First, install aster-rename-ids as a development dependency:

    npm install --save-dev aster-rename-ids

    Then, add it to your build script:

    var aster = require('aster');
    var renameIds = require('aster-rename-ids');
     
    aster.src('src/**/*.js')
    .map(renameIds({
      from: /^_(.*)$/,
      to: function () {
        return '$' + privateIndex++;
      }
    }))
    .map(aster.dest('dist'))
    .subscribe(aster.runner);

    API

    renameIds(options)

    options.from

    Type: RegExp

    Pattern for identifiers you want to rename.

    options.to

    Type: String | Function

    Replacement for given identifier patterns.

    License

    MIT License

    Install

    npm i aster-rename-ids

    DownloadsWeekly Downloads

    6

    Version

    1.1.1

    License

    MIT

    Last publish

    Collaborators

    • rreverser