Skip to content

Commit ce6a138

Browse files
committed
v2.0.1
1 parent e9fd6e0 commit ce6a138

19 files changed

+28
-25
lines changed

.travis.yml

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ sudo: false
33
cache: yarn
44
node_js:
55
- "node"
6+
- "8"
67
- "7"
78
- "6"
89
- "5"

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Changelog
22

3+
- `v2.0.1` - Sept 19 ,2017
4+
* Change default argument for `Array.compact` and `Object.compact` from `[null, undefined]` to `[null, undefined, '']`
35
- `v2.0.0` - Sept 2, 2017
46
* Make all Object patches much safer by moving them under `Object.prototype.rearmed()` and `Object.rearmed` method to fix issue #2
57
* Add `Object#rearmed.add()` and `Object.rearmed.remove()` methods for adding or removing methods to rearmed objects

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ array.any(cb=null) // returns bool
150150
151151
array.all(cb=null) // returns bool
152152
153-
array.compact(badValues=[null, undefined]) // returns array, accepts array or splat arguments
153+
array.compact(badValues=[null, undefined, '']) // returns array, accepts array or splat arguments
154154
155155
array.dig(*args) // returns value, accepts splat arguments or array
156156
@@ -223,7 +223,7 @@ obj.all(cb=null) // returns bool
223223
224224
obj.any(cb=null) // returns bool
225225
226-
obj.compact(badValues=[null, undefined]) // returns object, accepts array or splat arguments
226+
obj.compact(badValues=[null, undefined, '']) // returns object, accepts array or splat arguments
227227
228228
obj.dig(*args) // returns object, accepts splat arguments or array
229229

array.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ require('./array/uniq');
8686
var bad;
8787

8888
if(arguments.length === 0){
89-
bad = [null, undefined];
89+
bad = [null, undefined, ''];
9090
}else if(arguments.length === 1){
9191
if(Array.isArray(arguments[0])){
9292
bad = arguments[0];

array/compact.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
var bad;
1212

1313
if(arguments.length === 0){
14-
bad = [null, undefined];
14+
bad = [null, undefined, ''];
1515
}else if(arguments.length === 1){
1616
if(Array.isArray(arguments[0])){
1717
bad = arguments[0];

bower.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "rearmed-js",
3-
"version": "2.0.0",
3+
"version": "2.0.1",
44
"description": "A collection of helpful methods and monkey patches for Arrays, Objects, Numbers, and Strings in Javascript",
55
"main": "rearmed.js",
66
"directories": {

dist/array.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/array/compact.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/object.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/object/compact.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/rearmed.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

object.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ require('./object/values');
134134
compact: function(bad){
135135
var bad;
136136
if(arguments.length === 0){
137-
bad = [null, undefined];
137+
bad = [null, undefined, ''];
138138
}else if(arguments.length === 1){
139139
if(Array.isArray(arguments[0])){
140140
bad = arguments[0];

object/compact.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
compact: function(bad){
77
var bad;
88
if(arguments.length === 0){
9-
bad = [null, undefined];
9+
bad = [null, undefined, ''];
1010
}else if(arguments.length === 1){
1111
if(Array.isArray(arguments[0])){
1212
bad = arguments[0];

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "rearmed-js",
3-
"version": "2.0.0",
3+
"version": "2.0.1",
44
"description": "A collection of helpful methods and monkey patches for Arrays, Objects, Numbers, and Strings in Javascript",
55
"main": "rearmed.js",
66
"directories": {

rearmed.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ require('./array/uniq');
9393
var bad;
9494

9595
if(arguments.length === 0){
96-
bad = [null, undefined];
96+
bad = [null, undefined, ''];
9797
}else if(arguments.length === 1){
9898
if(Array.isArray(arguments[0])){
9999
bad = arguments[0];
@@ -1162,7 +1162,7 @@ require('./object/values');
11621162
compact: function(bad){
11631163
var bad;
11641164
if(arguments.length === 0){
1165-
bad = [null, undefined];
1165+
bad = [null, undefined, ''];
11661166
}else if(arguments.length === 1){
11671167
if(Array.isArray(arguments[0])){
11681168
bad = arguments[0];

src/rearmed/array/compact.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
var bad;
1111

1212
if(arguments.length === 0){
13-
bad = [null, undefined];
13+
bad = [null, undefined, ''];
1414
}else if(arguments.length === 1){
1515
if(Array.isArray(arguments[0])){
1616
bad = arguments[0];

src/rearmed/object/compact.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
compact: function(bad){
66
var bad;
77
if(arguments.length === 0){
8-
bad = [null, undefined];
8+
bad = [null, undefined, ''];
99
}else if(arguments.length === 1){
1010
if(Array.isArray(arguments[0])){
1111
bad = arguments[0];

0 commit comments

Comments
 (0)