jscodeshift
Advanced tools
Comparing version 0.3.6 to 0.3.7
@@ -182,2 +182,7 @@ /* | ||
* | ||
* In case of a negative index, the element is taken from the end: | ||
* | ||
* .at(0) - first element | ||
* .at(-1) - last element | ||
* | ||
* @param {number} index | ||
@@ -189,3 +194,3 @@ * @return {Collection} | ||
value: function at(index) { | ||
return fromPaths(this.__paths.slice(index, index + 1), this); | ||
return fromPaths(this.__paths.slice(index, index === -1 ? undefined : index + 1), this); | ||
} | ||
@@ -192,0 +197,0 @@ |
@@ -18,3 +18,2 @@ /* | ||
var assert = require('assert'); | ||
var matchNode = require('../matchNode'); | ||
@@ -168,3 +167,3 @@ var recast = require('recast'); | ||
remove: function remove() { | ||
this.forEach(function (path) { | ||
return this.forEach(function (path) { | ||
return path.prune(); | ||
@@ -171,0 +170,0 @@ }); |
@@ -99,3 +99,3 @@ /* | ||
getAllFiles(paths, function (name) { | ||
return getAllFiles(paths, function (name) { | ||
return !extensions || extensions.indexOf(path.extname(name)) != -1; | ||
@@ -102,0 +102,0 @@ }).then(function (files) { |
{ | ||
"name": "jscodeshift", | ||
"version": "0.3.6", | ||
"version": "0.3.7", | ||
"description": "A toolkit for JavaScript codemods", | ||
@@ -35,3 +35,3 @@ "repository": { | ||
"nomnom": "^1.8.1", | ||
"recast": "^0.10.28" | ||
"recast": "^0.10.32" | ||
}, | ||
@@ -38,0 +38,0 @@ "devDependencies": { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
57352
1229
Updatedrecast@^0.10.32