github facebook/jscodeshift v0.3.8

latest releases: 0.13.1, 0.13.0, 0.12.0...
8 years ago

Improvements

  • jscodeshift.match and many methods that accept an object as second argument for filtering / pattern matching (e.g. .find) now also accept functions / objects containing functions. This allows you to write more complex filters more easily.

    Example:

    j(source)
    .find(j.VariableDeclarator, {id: node => node.name === 'foo' || node.name === 'bar'})

finds all VariableDeclarators whose identifier is either named "foo" or "bar".

Internal changes

jscodeshift switched to jest v0.5.10, which means that tests will only run in Node v4+. jscodeshift will likely continue to function in older Node versions though.

Don't miss a new jscodeshift release

NewReleases is sending notifications on new releases.