diff --git a/src/app/pipes/array/diff.spec.ts b/src/app/pipes/array/diff.spec.ts index 9e554697..db48beae 100644 --- a/src/app/pipes/array/diff.spec.ts +++ b/src/app/pipes/array/diff.spec.ts @@ -13,6 +13,7 @@ describe('DiffPipe', () => { }); it('should returns an array of diff between arrays', () => { + expect(pipe.transform([2, 3], [])).toEqual([2, 3]); expect(pipe.transform([], [2, 3])).toEqual([]); expect(pipe.transform([1, 2, 3], [2, 3])).toEqual([1]); expect(pipe.transform([1, 2, 3], [1, 4], [2, 5])).toEqual([3]); diff --git a/src/app/pipes/array/diff.ts b/src/app/pipes/array/diff.ts index 5f77676b..566cd4b6 100644 --- a/src/app/pipes/array/diff.ts +++ b/src/app/pipes/array/diff.ts @@ -3,9 +3,11 @@ import {PipeTransform, Pipe} from '@angular/core'; @Pipe({name: 'diff'}) export class DiffPipe implements PipeTransform { - transform(arr: any, ...args: any[]): any[] { - return !Array.isArray(arr) ? arr : args.reduce((diffArr, currArr) => { - return diffArr.filter(elm => !~currArr.indexOf(elm)) - }, arr); + transform(input: any, ...args: any[]): any[] { + if (!Array.isArray(input)) { + return input; + } + + return args.reduce((d, c) => d.filter(e => !~c.indexOf(e)), input); } } diff --git a/src/app/pipes/array/every.ts b/src/app/pipes/array/every.ts index 8013ceb6..b7948d59 100644 --- a/src/app/pipes/array/every.ts +++ b/src/app/pipes/array/every.ts @@ -3,7 +3,7 @@ import {PipeTransform, Pipe} from '@angular/core'; @Pipe({name: 'every'}) export class EveryPipe implements PipeTransform { - transform(arr: any[], predicate: (value: any, index: number, array: any[]) => boolean): boolean|any[] { - return Array.isArray(arr) ? arr.every(predicate) : arr; + transform(input: any[], predicate: (value: any, index: number, array: any[]) => boolean): boolean|any[] { + return Array.isArray(input) ? input.every(predicate) : input; } } diff --git a/src/app/pipes/array/filter-by.ts b/src/app/pipes/array/filter-by.ts index 9ac8a985..26d91175 100644 --- a/src/app/pipes/array/filter-by.ts +++ b/src/app/pipes/array/filter-by.ts @@ -1,25 +1,25 @@ import {PipeTransform, Pipe} from '@angular/core'; -import {isNumber, isString, extractDeepPropertyByMapKey} from '../helpers/helpers'; +import {isString, extractDeepPropertyByMapKey, isNumberFinite} from '../helpers/helpers'; @Pipe({name: 'filterBy'}) export class FilterByPipe implements PipeTransform { - transform(arr: any, props: Array, search: any, strict: boolean = false): any[] { - if (!Array.isArray(arr) || (!isString(search) && !isNumber(search))) { - return arr; + transform(input: any, props: Array, search: any, strict: boolean = false): any[] { + if (!Array.isArray(input) || (!isString(search) && !isNumberFinite(search))) { + return input; } - search = String(search).toLowerCase(); + const term = String(search).toLowerCase(); - return arr.filter((obj) => { + return input.filter((obj) => { return props.some((prop) => { const value: string = String( extractDeepPropertyByMapKey(obj, prop) ).toLowerCase(); return strict - ? search === value - : !!~value.indexOf(search); + ? term === value + : !!~value.indexOf(term); }); }); } diff --git a/src/app/pipes/array/flatten.ts b/src/app/pipes/array/flatten.ts index 7e83f6f2..b7bbf2ff 100644 --- a/src/app/pipes/array/flatten.ts +++ b/src/app/pipes/array/flatten.ts @@ -3,21 +3,23 @@ import {PipeTransform, Pipe} from '@angular/core'; @Pipe({name: 'flatten'}) export class FlattenPipe implements PipeTransform { - transform(arr: any, shallow: boolean = false): any[] { - if (!Array.isArray(arr)) { - return arr; + transform(input: any, shallow: boolean = false): any[] { + if (!Array.isArray(input)) { + return input; } return shallow - ? [].concat.apply([], arr) - : this.flatten(arr); + ? [].concat.apply([], input) + : this.flatten(input); } private flatten(array: any[]): any[] { - return array.reduce((arr: any[], elm: any) => - Array.isArray(elm) - ? arr.concat(this.flatten(elm)) - : arr.concat(elm) - , []); + return array.reduce((arr: any[], elm: any) => { + if (Array.isArray(elm)) { + return arr.concat(this.flatten(elm)); + } + + return arr.concat(elm); + }, []); } } diff --git a/src/app/pipes/array/group-by.ts b/src/app/pipes/array/group-by.ts index b64898f7..fbd5f139 100644 --- a/src/app/pipes/array/group-by.ts +++ b/src/app/pipes/array/group-by.ts @@ -4,28 +4,35 @@ import {extractDeepPropertyByMapKey, isFunction} from '../helpers/helpers'; @Pipe({name: 'groupBy'}) export class GroupByPipe implements PipeTransform { - transform(arr: any, discriminator: any = []): any { - if (!Array.isArray(arr)) { - return arr; + transform(input: any, discriminator: any = []): any { + if (!Array.isArray(input)) { + return input; } - return this.groupBy(arr, discriminator); + return this.groupBy(input, discriminator); } private groupBy(list: any[], discriminator: any) { return list.reduce((acc, payload) => { - let key; - if (isFunction(discriminator)) { - key = (discriminator)(payload); - } else if (Array.isArray(discriminator)) { - key = discriminator.map(k => extractDeepPropertyByMapKey(payload, k)).join('_'); - } else { - key = extractDeepPropertyByMapKey(payload, discriminator); - } - - return acc[key] = Array.isArray(acc[key]) + const key = this.extractKeyByDiscriminator(discriminator, payload); + + acc[key] = Array.isArray(acc[key]) ? acc[key].concat([payload]) - : [payload], acc; + : [payload]; + + return acc; }, {}); } + + private extractKeyByDiscriminator(discriminator, payload) { + if (isFunction(discriminator)) { + return (discriminator)(payload); + } + + if (Array.isArray(discriminator)) { + return discriminator.map(k => extractDeepPropertyByMapKey(payload, k)).join('_'); + } + + return extractDeepPropertyByMapKey(payload, discriminator); + } } diff --git a/src/app/pipes/array/initial.ts b/src/app/pipes/array/initial.ts index d1dc2d6a..5f25e33b 100644 --- a/src/app/pipes/array/initial.ts +++ b/src/app/pipes/array/initial.ts @@ -3,9 +3,9 @@ import {PipeTransform, Pipe} from '@angular/core'; @Pipe({name: 'initial'}) export class InitialPipe implements PipeTransform { - transform(arr: any, num: number = 0): any[] { - return Array.isArray(arr) - ? arr.slice(0, arr.length - num) - : arr; + transform(input: any, num: number = 0): any[] { + return Array.isArray(input) + ? input.slice(0, input.length - num) + : input; } } diff --git a/src/app/pipes/array/intersection.ts b/src/app/pipes/array/intersection.ts index 5a4fb7a4..883cf2a7 100644 --- a/src/app/pipes/array/intersection.ts +++ b/src/app/pipes/array/intersection.ts @@ -3,13 +3,11 @@ import {PipeTransform, Pipe} from '@angular/core'; @Pipe({name: 'intersection'}) export class IntersectionPipe implements PipeTransform { - transform(arr: any, ...args: any[]): any[] { - if (!Array.isArray(arr)) { - return arr; + transform(input: any, ...args: any[]): any[] { + if (!Array.isArray(input)) { + return input; } - return args.reduce((newArr, currArr) => { - return newArr.filter(elm => !!~currArr.indexOf(elm)); - }, arr); + return args.reduce((n, c) => n.filter(e => !!~c.indexOf(e)), input); } } diff --git a/src/app/pipes/array/order-by.ts b/src/app/pipes/array/order-by.ts index 982fcf9d..cf61e2df 100644 --- a/src/app/pipes/array/order-by.ts +++ b/src/app/pipes/array/order-by.ts @@ -4,12 +4,12 @@ import {isString, extractDeepPropertyByMapKey} from '../helpers/helpers'; @Pipe({name: 'orderBy'}) export class OrderByPipe implements PipeTransform { - transform(arr: any, config?: any): any[] { - if (!Array.isArray(arr)) { - return arr; + transform(input: any, config?: any): any[] { + if (!Array.isArray(input)) { + return input; } - const out = [...arr]; + const out = [...input]; // sort by multiple properties if (Array.isArray(config)) { diff --git a/src/app/pipes/array/pluck.ts b/src/app/pipes/array/pluck.ts index c0d85529..ffa3fd1f 100644 --- a/src/app/pipes/array/pluck.ts +++ b/src/app/pipes/array/pluck.ts @@ -4,9 +4,9 @@ import {extractDeepPropertyByMapKey} from '../helpers/helpers'; @Pipe({name: 'pluck'}) export class PluckPipe implements PipeTransform { - transform(arr: any, map: string): any[] { - return Array.isArray(arr) - ? arr.map(e => extractDeepPropertyByMapKey(e, map)) - : arr; + transform(input: any, map: string): any[] { + return Array.isArray(input) + ? input.map(e => extractDeepPropertyByMapKey(e, map)) + : input; } } diff --git a/src/app/pipes/array/reverse.ts b/src/app/pipes/array/reverse.ts index 2417cd8a..6cd4c1ae 100644 --- a/src/app/pipes/array/reverse.ts +++ b/src/app/pipes/array/reverse.ts @@ -4,14 +4,14 @@ import {isString} from '../helpers/helpers'; @Pipe({name: 'reverse'}) export class ReversePipe implements PipeTransform { - transform(value: any): any + transform(input: any): any { - if (isString(value)) { - return value.split('').reverse().join(''); + if (isString(input)) { + return input.split('').reverse().join(''); } - return Array.isArray(value) - ? value.reverse() - : value; + return Array.isArray(input) + ? input.reverse() + : input; } } diff --git a/src/app/pipes/array/sample.ts b/src/app/pipes/array/sample.ts index 2a80900e..9231c68e 100644 --- a/src/app/pipes/array/sample.ts +++ b/src/app/pipes/array/sample.ts @@ -3,15 +3,17 @@ import {PipeTransform, Pipe} from '@angular/core'; @Pipe({name: 'sample'}) export class SamplePipe implements PipeTransform { - transform(arr: any, len: number = 1): any[] { - if (!Array.isArray(arr)) { - return arr; + transform(input: any, len: number = 1): any[] { + if (!Array.isArray(input)) { + return input; } let sample = []; - for (let i = 0, tmp = [...arr], l = len < tmp.length ? len : tmp.length; i < l; ++i) { - const j = Math.floor(Math.random() * tmp.length); - sample = sample.concat(tmp.splice(j ,1)); + for (let i = 0, tmp = [...input], l = len < tmp.length ? len : tmp.length; i < l; ++i) { + sample = sample.concat(tmp.splice( + Math.floor(Math.random() * tmp.length), + 1 + )); } return sample; diff --git a/src/app/pipes/array/shuffle.ts b/src/app/pipes/array/shuffle.ts index 34a78c3d..6b405b7f 100644 --- a/src/app/pipes/array/shuffle.ts +++ b/src/app/pipes/array/shuffle.ts @@ -5,13 +5,13 @@ export class ShufflePipe implements PipeTransform { // Using a version of the Fisher-Yates shuffle algorithm // https://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle - transform(arr: any): any[] { - if (!Array.isArray(arr)) { - return arr; + transform(input: any): any[] { + if (!Array.isArray(input)) { + return input; } - let shuffled = [...arr]; - for (let i = 0, n = arr.length - 1, l = n - 1; i < l; ++i) { + let shuffled = [...input]; + for (let i = 0, n = input.length - 1, l = n - 1; i < l; ++i) { const j = Math.floor(Math.random() * (n - i + 1)) + i; [shuffled[i], shuffled[j]] = [shuffled[j], shuffled[i]]; } diff --git a/src/app/pipes/array/some.ts b/src/app/pipes/array/some.ts index ead06373..430201bd 100644 --- a/src/app/pipes/array/some.ts +++ b/src/app/pipes/array/some.ts @@ -3,7 +3,7 @@ import {PipeTransform, Pipe} from '@angular/core'; @Pipe({name: 'some'}) export class SomePipe implements PipeTransform { - transform(arr: any, predicate: (value: any, index: number, array: any[]) => boolean): boolean { - return Array.isArray(arr) ? arr.some(predicate) : arr; + transform(input: any, predicate: (value: any, index: number, array: any[]) => boolean): boolean { + return Array.isArray(input) ? input.some(predicate) : input; } } diff --git a/src/app/pipes/array/tail.ts b/src/app/pipes/array/tail.ts index cf2fad86..1ae42229 100644 --- a/src/app/pipes/array/tail.ts +++ b/src/app/pipes/array/tail.ts @@ -3,7 +3,7 @@ import {PipeTransform, Pipe} from '@angular/core'; @Pipe({name: 'tail'}) export class TailPipe implements PipeTransform { - transform(arr: any, num: number = 0): any[] { - return Array.isArray(arr) ? arr.slice(num) : arr; + transform(input: any, num: number = 0): any[] { + return Array.isArray(input) ? input.slice(num) : input; } } diff --git a/src/app/pipes/array/truthify.ts b/src/app/pipes/array/truthify.ts index 8f64a501..02396a12 100644 --- a/src/app/pipes/array/truthify.ts +++ b/src/app/pipes/array/truthify.ts @@ -3,9 +3,9 @@ import {PipeTransform, Pipe} from '@angular/core'; @Pipe({name: 'truthify'}) export class TrurthifyPipe implements PipeTransform { - transform(arr: any): any[] { - return Array.isArray(arr) - ? arr.filter(elm => !!elm) - : arr; + transform(input: any): any[] { + return Array.isArray(input) + ? input.filter(e => !!e) + : input; } } diff --git a/src/app/pipes/array/union.ts b/src/app/pipes/array/union.ts index f21162e6..05f3328c 100644 --- a/src/app/pipes/array/union.ts +++ b/src/app/pipes/array/union.ts @@ -3,9 +3,9 @@ import {PipeTransform, Pipe} from '@angular/core'; @Pipe({name: 'union'}) export class UnionPipe implements PipeTransform { - transform(arr: any, args: any[] = []): any[] { - if (!Array.isArray(arr) || !Array.isArray(args)) { - return arr; + transform(input: any, args: any[] = []): any[] { + if (!Array.isArray(input) || !Array.isArray(args)) { + return input; } return args.reduce((newArr, currArr) => { @@ -14,6 +14,6 @@ export class UnionPipe implements PipeTransform { ? noDupArr.concat([curr]) : noDupArr; }, [])); - }, arr); + }, input); } } diff --git a/src/app/pipes/array/unique.ts b/src/app/pipes/array/unique.ts index 5da8e52d..005e76a2 100644 --- a/src/app/pipes/array/unique.ts +++ b/src/app/pipes/array/unique.ts @@ -3,9 +3,9 @@ import {PipeTransform, Pipe} from '@angular/core'; @Pipe({name: 'unique'}) export class UniquePipe implements PipeTransform { - transform(arr: any): any[] { - return Array.isArray(arr) - ? arr.filter((elm, index) => arr.indexOf(elm) === index) - : arr; + transform(input: any): any[] { + return Array.isArray(input) + ? input.filter((e, i) => input.indexOf(e) === i) + : input; } } diff --git a/src/app/pipes/array/without.ts b/src/app/pipes/array/without.ts index 29b0f68e..cc8d7bfe 100644 --- a/src/app/pipes/array/without.ts +++ b/src/app/pipes/array/without.ts @@ -3,9 +3,9 @@ import {PipeTransform, Pipe} from '@angular/core'; @Pipe({name: 'without'}) export class WithoutPipe implements PipeTransform { - transform(arr: any, args: any[] = []): any[] { - return Array.isArray(arr) - ? arr.filter(elm => !~args.indexOf(elm)) - : arr; + transform(input: any, args: any[] = []): any[] { + return Array.isArray(input) + ? input.filter(e => !~args.indexOf(e)) + : input; } } diff --git a/src/app/pipes/boolean/is-array.ts b/src/app/pipes/boolean/is-array.ts index c662d22f..ceaee3be 100644 --- a/src/app/pipes/boolean/is-array.ts +++ b/src/app/pipes/boolean/is-array.ts @@ -3,7 +3,7 @@ import {PipeTransform, Pipe} from '@angular/core'; @Pipe({name: 'isArray'}) export class IsArrayPipe implements PipeTransform { - transform(value: any): boolean { - return Array.isArray(value); + transform(input: any): boolean { + return Array.isArray(input); } } diff --git a/src/app/pipes/boolean/is-defined.ts b/src/app/pipes/boolean/is-defined.ts index f61f3d9a..d4dd146e 100644 --- a/src/app/pipes/boolean/is-defined.ts +++ b/src/app/pipes/boolean/is-defined.ts @@ -4,7 +4,7 @@ import {isUndefined} from '../helpers/helpers'; @Pipe({name: 'isDefined'}) export class IsDefinedPipe implements PipeTransform { - transform(value: any): boolean { - return !isUndefined(value); + transform(input: any): boolean { + return !isUndefined(input); } } diff --git a/src/app/pipes/boolean/is-equal-to.ts b/src/app/pipes/boolean/is-equal-to.ts index 44596640..571099b8 100644 --- a/src/app/pipes/boolean/is-equal-to.ts +++ b/src/app/pipes/boolean/is-equal-to.ts @@ -3,7 +3,7 @@ import {PipeTransform, Pipe} from '@angular/core'; @Pipe({name: 'isEqualTo'}) export class IsEqualToPipe implements PipeTransform { - transform(value: any, other: any): boolean { - return value == other; + transform(input: any, other: any): boolean { + return input == other; } } diff --git a/src/app/pipes/boolean/is-function.ts b/src/app/pipes/boolean/is-function.ts index 2224c926..047a3463 100644 --- a/src/app/pipes/boolean/is-function.ts +++ b/src/app/pipes/boolean/is-function.ts @@ -4,7 +4,7 @@ import {isFunction} from '../helpers/helpers'; @Pipe({name: 'isFunction'}) export class IsFunctionPipe implements PipeTransform { - transform(value: any): boolean { - return isFunction(value); + transform(input: any): boolean { + return isFunction(input); } } diff --git a/src/app/pipes/boolean/is-greater-equal-than.ts b/src/app/pipes/boolean/is-greater-equal-than.ts index 15dd1293..4f280331 100644 --- a/src/app/pipes/boolean/is-greater-equal-than.ts +++ b/src/app/pipes/boolean/is-greater-equal-than.ts @@ -3,7 +3,7 @@ import {PipeTransform, Pipe} from '@angular/core'; @Pipe({name: 'isGreaterEqualThan'}) export class IsGreaterEqualThanPipe implements PipeTransform { - transform(value: number, other: number): boolean { - return value >= other; + transform(input: number, other: number): boolean { + return input >= other; } } diff --git a/src/app/pipes/boolean/is-greater-than.ts b/src/app/pipes/boolean/is-greater-than.ts index eea11418..a25a72cf 100644 --- a/src/app/pipes/boolean/is-greater-than.ts +++ b/src/app/pipes/boolean/is-greater-than.ts @@ -3,7 +3,7 @@ import {PipeTransform, Pipe} from '@angular/core'; @Pipe({name: 'isGreaterThan'}) export class IsGreaterThanPipe implements PipeTransform { - transform(value: number, other: number): boolean { - return value > other; + transform(input: number, other: number): boolean { + return input > other; } } diff --git a/src/app/pipes/boolean/is-identical-to.ts b/src/app/pipes/boolean/is-identical-to.ts index 62aed854..3bb4b4ba 100644 --- a/src/app/pipes/boolean/is-identical-to.ts +++ b/src/app/pipes/boolean/is-identical-to.ts @@ -3,7 +3,7 @@ import {PipeTransform, Pipe} from '@angular/core'; @Pipe({name: 'isIdenticalTo'}) export class IsIdenticalToPipe implements PipeTransform { - transform(value: any, other: any): boolean { - return value === other; + transform(input: any, other: any): boolean { + return input === other; } } diff --git a/src/app/pipes/boolean/is-less-equal-than.ts b/src/app/pipes/boolean/is-less-equal-than.ts index 07c6043f..15c4c662 100644 --- a/src/app/pipes/boolean/is-less-equal-than.ts +++ b/src/app/pipes/boolean/is-less-equal-than.ts @@ -3,7 +3,7 @@ import {PipeTransform, Pipe} from '@angular/core'; @Pipe({name: 'isLessEqualThan'}) export class IsLessEqualThanPipe implements PipeTransform { - transform(value: number, other: number): boolean { - return value <= other; + transform(input: number, other: number): boolean { + return input <= other; } } diff --git a/src/app/pipes/boolean/is-less-than.ts b/src/app/pipes/boolean/is-less-than.ts index a7559f79..fdcfc895 100644 --- a/src/app/pipes/boolean/is-less-than.ts +++ b/src/app/pipes/boolean/is-less-than.ts @@ -3,7 +3,7 @@ import {PipeTransform, Pipe} from '@angular/core'; @Pipe({name: 'isLessThan'}) export class IsLessThanPipe implements PipeTransform { - transform(value: number, other: number): boolean { - return value < other; + transform(input: number, other: number): boolean { + return input < other; } } diff --git a/src/app/pipes/boolean/is-not-equal-to.ts b/src/app/pipes/boolean/is-not-equal-to.ts index ce5d68ca..87cfe4db 100644 --- a/src/app/pipes/boolean/is-not-equal-to.ts +++ b/src/app/pipes/boolean/is-not-equal-to.ts @@ -3,7 +3,7 @@ import {PipeTransform, Pipe} from '@angular/core'; @Pipe({name: 'isNotEqualTo'}) export class IsNotEqualToPipe implements PipeTransform { - transform(value: any, other: any): boolean { - return value != other; + transform(input: any, other: any): boolean { + return input != other; } } diff --git a/src/app/pipes/boolean/is-not-identical-to.ts b/src/app/pipes/boolean/is-not-identical-to.ts index 89cbe880..650f90b6 100644 --- a/src/app/pipes/boolean/is-not-identical-to.ts +++ b/src/app/pipes/boolean/is-not-identical-to.ts @@ -3,7 +3,7 @@ import {PipeTransform, Pipe} from '@angular/core'; @Pipe({name: 'isNotIdenticalTo'}) export class IsNotIdenticalToPipe implements PipeTransform { - transform(value: any, other: any): boolean { - return value !== other; + transform(input: any, other: any): boolean { + return input !== other; } } diff --git a/src/app/pipes/boolean/is-null.ts b/src/app/pipes/boolean/is-null.ts index 97d692ae..2ce2c7c9 100644 --- a/src/app/pipes/boolean/is-null.ts +++ b/src/app/pipes/boolean/is-null.ts @@ -3,7 +3,7 @@ import {PipeTransform, Pipe} from '@angular/core'; @Pipe({name: 'isNull'}) export class IsNullPipe implements PipeTransform { - transform(value: any): boolean { - return value === null; + transform(input: any): boolean { + return input === null; } } diff --git a/src/app/pipes/boolean/is-number.ts b/src/app/pipes/boolean/is-number.ts index 074dc683..435ec080 100644 --- a/src/app/pipes/boolean/is-number.ts +++ b/src/app/pipes/boolean/is-number.ts @@ -4,7 +4,7 @@ import {isNumber} from '../helpers/helpers'; @Pipe({name: 'isNumber'}) export class IsNumberPipe implements PipeTransform { - transform(value: any): boolean { - return isNumber(value); + transform(input: any): boolean { + return isNumber(input); } } diff --git a/src/app/pipes/boolean/is-object.ts b/src/app/pipes/boolean/is-object.ts index 2d391929..6ddab972 100644 --- a/src/app/pipes/boolean/is-object.ts +++ b/src/app/pipes/boolean/is-object.ts @@ -4,7 +4,7 @@ import {isObject} from '../helpers/helpers'; @Pipe({name: 'isObject'}) export class IsObjectPipe implements PipeTransform { - transform(value: any): boolean { - return isObject(value); + transform(input: any): boolean { + return isObject(input); } } diff --git a/src/app/pipes/boolean/is-string.ts b/src/app/pipes/boolean/is-string.ts index 813f70e0..6e8c9538 100644 --- a/src/app/pipes/boolean/is-string.ts +++ b/src/app/pipes/boolean/is-string.ts @@ -4,7 +4,7 @@ import {isString} from '../helpers/helpers'; @Pipe({name: 'isString'}) export class IsStringPipe implements PipeTransform { - transform(value: any): boolean { - return isString(value); + transform(input: any): boolean { + return isString(input); } } diff --git a/src/app/pipes/boolean/is-undefined.ts b/src/app/pipes/boolean/is-undefined.ts index 4b4e4c9b..a412dcf0 100644 --- a/src/app/pipes/boolean/is-undefined.ts +++ b/src/app/pipes/boolean/is-undefined.ts @@ -4,7 +4,7 @@ import {isUndefined} from '../helpers/helpers'; @Pipe({name: 'isUndefined'}) export class IsUndefinedPipe implements PipeTransform { - transform(value: any): boolean { - return isUndefined(value); + transform(input: any): boolean { + return isUndefined(input); } }