jscodeshift
Advanced tools
Comparing version
@@ -11,4 +11,5 @@ # Contributing to jscodeshift | ||
We actively welcome your pull requests. | ||
1. Fork the repo and create your branch from `master`. | ||
2. If you've added code that should be tested, add tests | ||
2. If you've added code that should be tested, add tests. | ||
3. If you've changed APIs, update the documentation. | ||
@@ -38,3 +39,3 @@ 4. Ensure the test suite passes. | ||
* Prefer `'` over `"` | ||
* `"use strict";` | ||
* `'use strict';` | ||
* 80 character line length | ||
@@ -41,0 +42,0 @@ * "Attractive" |
@@ -11,3 +11,3 @@ /* | ||
"use strict"; | ||
'use strict'; | ||
@@ -220,6 +220,10 @@ var assert = require('assert'); | ||
value = value.map(function(v) {return v.toString();}); | ||
return _.union(value, _.intersection.apply( | ||
null, | ||
value.map(function(type) {return astTypes.getSupertypeNames(type);}) | ||
)); | ||
if (value.length > 1) { | ||
return _.union(value, _.intersection.apply( | ||
null, | ||
value.map(function(type) {return astTypes.getSupertypeNames(type);}) | ||
)); | ||
} else { | ||
return value.concat(astTypes.getSupertypeNames(value[0])); | ||
} | ||
} | ||
@@ -226,0 +230,0 @@ |
@@ -11,3 +11,3 @@ /* | ||
"use strict"; | ||
'use strict'; | ||
@@ -14,0 +14,0 @@ var _ = require('lodash'); |
@@ -11,3 +11,3 @@ /* | ||
"use strict"; | ||
'use strict'; | ||
@@ -14,0 +14,0 @@ var _ = require('lodash'); |
@@ -11,3 +11,3 @@ /* | ||
"use strict"; | ||
'use strict'; | ||
@@ -14,0 +14,0 @@ var _ = require('lodash'); |
@@ -11,3 +11,3 @@ /* | ||
"use strict"; | ||
'use strict'; | ||
var Collection = require('./Collection'); | ||
@@ -14,0 +14,0 @@ |
@@ -11,3 +11,3 @@ /* | ||
"use strict"; | ||
'use strict'; | ||
@@ -14,0 +14,0 @@ var child_process = require('child_process'); |
@@ -11,3 +11,3 @@ /* | ||
"use strict"; | ||
'use strict'; | ||
@@ -14,0 +14,0 @@ var async = require('async'); |
{ | ||
"name": "jscodeshift", | ||
"version": "0.1.4", | ||
"version": "0.1.5", | ||
"description": "A toolkit for JavaScript codemods", | ||
@@ -5,0 +5,0 @@ "repository": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
50882
1.37%1120
0.36%