@croudtech/vue-connect-ui
Advanced tools
Comparing version 0.7.0 to 0.8.0
{ | ||
"name": "@croudtech/vue-connect-ui", | ||
"version": "0.7.0", | ||
"version": "0.8.0", | ||
"description": "Vue plugin providing a suite of Croud UI components", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/CroudTech/connect-vue-ui-kit#readme", |
@@ -0,1 +1,2 @@ | ||
import { arrayReduce } from 'fast-loops' | ||
import { | ||
@@ -21,2 +22,7 @@ mergeData as mergeFunctionalData | ||
export const compact = (array) => arrayReduce(array, (result, value) => { | ||
if (value) result.push(value) | ||
return result | ||
}, []) | ||
export const validate = contains | ||
@@ -23,0 +29,0 @@ |
@@ -16,2 +16,10 @@ import * as _ from './utils' | ||
test('compact(array)', () => { | ||
expect(_.compact([ 'a' ])).toEqual([ 'a' ]) | ||
expect(_.compact([ 'a', '' ])).toEqual([ 'a' ]) | ||
expect(_.compact([ 'a', null ])).toEqual([ 'a' ]) | ||
expect(_.compact([ 'a', false ])).toEqual([ 'a' ]) | ||
expect(_.compact([ 'a', undefined ])).toEqual([ 'a' ]) // eslint-disable-line | ||
}) | ||
test('validate(values)', () => { | ||
@@ -18,0 +26,0 @@ const validator = _.validate([ 1, 2 ]) |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
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
217166
3097