styled-components
Advanced tools
Comparing version 0.1.7 to 0.1.8
@@ -27,3 +27,3 @@ 'use strict'; | ||
/* Remove falsey values */ | ||
if (!chunk) return array; | ||
if (chunk === undefined || chunk === null || chunk === false || chunk === '') return array; | ||
/* Flatten arrays */ | ||
@@ -30,0 +30,0 @@ if (Array.isArray(chunk)) return array.concat.apply(array, _toConsumableArray(flatten(chunk, executionContext))); |
@@ -20,2 +20,5 @@ 'use strict'; | ||
}); | ||
it('doesnt drop any numbers', function () { | ||
(0, _expect2.default)((0, _flatten2.default)(['foo', 0, 'bar', NaN, 'baz', -1])).toEqual(['foo', '0', 'bar', 'NaN', 'baz', '-1']); | ||
}); | ||
it('toStrings everything', function () { | ||
@@ -22,0 +25,0 @@ (0, _expect2.default)((0, _flatten2.default)([1, true])).toEqual(['1', 'true']); |
{ | ||
"name": "styled-components", | ||
"version": "0.1.7", | ||
"version": "0.1.8", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -12,3 +12,3 @@ // @flow | ||
/* Remove falsey values */ | ||
if (!chunk) return array | ||
if (chunk === undefined || chunk === null || chunk === false || chunk === '') return array | ||
/* Flatten arrays */ | ||
@@ -15,0 +15,0 @@ if (Array.isArray(chunk)) return array.concat(...flatten(chunk, executionContext)) |
@@ -11,2 +11,5 @@ import expect from 'expect' | ||
}) | ||
it('doesnt drop any numbers', () => { | ||
expect(flatten(['foo', 0, 'bar', NaN, 'baz', -1])).toEqual(['foo', '0', 'bar', 'NaN', 'baz', '-1']) | ||
}) | ||
it('toStrings everything', () => { | ||
@@ -13,0 +16,0 @@ expect(flatten([1, true])).toEqual(['1', 'true']) |
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
494403
12319