jscodeshift-collections
Some more Collections for jscodeshift for easy and terse api for writing Codemods
Last updated 2 months ago by rajasegar .
ISC · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install jscodeshift-collections 
SYNC missed versions from official npm registry.

jscodeshift-collections

Some more Collections for jscodeshift for easy and terse api for writing Codemods

Install

npm install jscodeshift-collections

Usage

const jscsCollections = require('jscodeshift-collections');
jscsCollections.registerCollections();

FunctionDeclaration

Say for example, if you want to rename a function declaration foo to bar

Before

function foo() {
}

Codemod with new Collection API

j.findFunctionDeclarations('foo')
 .renameTo('bar')

After

function bar() {
}

List of Collection:

  • FunctionDeclaration
  • CallExpression

Current Tags

  • 1.1.0                                ...           latest (2 months ago)

9 Versions

  • 1.1.0                                ...           2 months ago
  • 1.0.7                                ...           2 months ago
  • 1.0.6                                ...           2 months ago
  • 1.0.5                                ...           2 months ago
  • 1.0.4                                ...           2 months ago
  • 1.0.3                                ...           2 months ago
  • 1.0.2                                ...           2 months ago
  • 1.0.1                                ...           2 months ago
  • 1.0.0                                ...           2 months ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (2)
Dev Dependencies (6)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |