From ba873882e9128c2b6ee15c20ecf5b4c2b8d8e6de Mon Sep 17 00:00:00 2001 From: Enea Jahollari Date: Sun, 30 Apr 2023 16:38:18 +0200 Subject: [PATCH] feat: convert all pipes to standalone --- src/ng-pipes/pipes/array/chunk.ts | 10 +- src/ng-pipes/pipes/array/diff.ts | 5 +- src/ng-pipes/pipes/array/every.ts | 5 +- src/ng-pipes/pipes/array/filter-by-impure.ts | 6 +- src/ng-pipes/pipes/array/filter-by.ts | 17 +- src/ng-pipes/pipes/array/flatten.ts | 5 +- src/ng-pipes/pipes/array/from-pairs.spec.ts | 7 +- src/ng-pipes/pipes/array/from-pairs.ts | 5 +- src/ng-pipes/pipes/array/group-by-impure.ts | 6 +- src/ng-pipes/pipes/array/group-by.spec.ts | 40 +- src/ng-pipes/pipes/array/group-by.ts | 7 +- src/ng-pipes/pipes/array/index.ts | 5 +- src/ng-pipes/pipes/array/initial.ts | 5 +- src/ng-pipes/pipes/array/intersection.ts | 5 +- src/ng-pipes/pipes/array/order-by-impure.ts | 6 +- src/ng-pipes/pipes/array/order-by.spec.ts | 14 +- src/ng-pipes/pipes/array/order-by.ts | 5 +- src/ng-pipes/pipes/array/pluck.ts | 8 +- src/ng-pipes/pipes/array/range.ts | 5 +- src/ng-pipes/pipes/array/reverse.ts | 10 +- src/ng-pipes/pipes/array/sample.ts | 5 +- src/ng-pipes/pipes/array/shuffle.ts | 5 +- src/ng-pipes/pipes/array/some.ts | 5 +- src/ng-pipes/pipes/array/tail.ts | 5 +- src/ng-pipes/pipes/array/truthify.ts | 7 +- src/ng-pipes/pipes/array/union.spec.ts | 30 +- src/ng-pipes/pipes/array/union.ts | 5 +- src/ng-pipes/pipes/array/unique.spec.ts | 11 +- src/ng-pipes/pipes/array/unique.ts | 5 +- src/ng-pipes/pipes/array/without.ts | 7 +- src/ng-pipes/pipes/boolean/index.ts | 3 +- src/ng-pipes/pipes/boolean/is-array.ts | 5 +- src/ng-pipes/pipes/boolean/is-defined.ts | 5 +- src/ng-pipes/pipes/boolean/is-equal-to.ts | 5 +- .../pipes/boolean/is-function.spec.ts | 2 +- src/ng-pipes/pipes/boolean/is-function.ts | 5 +- .../pipes/boolean/is-greater-equal-than.ts | 5 +- src/ng-pipes/pipes/boolean/is-greater-than.ts | 5 +- src/ng-pipes/pipes/boolean/is-identical-to.ts | 5 +- .../pipes/boolean/is-less-equal-than.ts | 5 +- src/ng-pipes/pipes/boolean/is-less-than.ts | 5 +- src/ng-pipes/pipes/boolean/is-not-equal-to.ts | 5 +- .../pipes/boolean/is-not-identical-to.ts | 5 +- src/ng-pipes/pipes/boolean/is-null.ts | 5 +- src/ng-pipes/pipes/boolean/is-number.ts | 5 +- src/ng-pipes/pipes/boolean/is-object.ts | 5 +- src/ng-pipes/pipes/boolean/is-string.ts | 5 +- src/ng-pipes/pipes/boolean/is-undefined.ts | 5 +- src/ng-pipes/pipes/date/index.ts | 3 +- src/ng-pipes/pipes/date/time-ago.ts | 5 +- src/ng-pipes/pipes/helpers/helpers.ts | 23 +- src/ng-pipes/pipes/math/average.ts | 2 +- src/ng-pipes/pipes/math/bytes.ts | 7 +- src/ng-pipes/pipes/math/ceil.ts | 5 +- src/ng-pipes/pipes/math/degrees.ts | 5 +- src/ng-pipes/pipes/math/floor.ts | 5 +- src/ng-pipes/pipes/math/index.ts | 3 +- src/ng-pipes/pipes/math/max.ts | 5 +- src/ng-pipes/pipes/math/min.ts | 5 +- src/ng-pipes/pipes/math/percentage.ts | 5 +- src/ng-pipes/pipes/math/pow.ts | 5 +- src/ng-pipes/pipes/math/radians.ts | 5 +- src/ng-pipes/pipes/math/round.ts | 5 +- src/ng-pipes/pipes/math/sqrt.ts | 5 +- src/ng-pipes/pipes/math/sum.ts | 5 +- src/ng-pipes/pipes/object/diff-obj.ts | 5 +- src/ng-pipes/pipes/object/index.ts | 3 +- src/ng-pipes/pipes/object/invert-by.ts | 5 +- src/ng-pipes/pipes/object/invert.ts | 5 +- src/ng-pipes/pipes/object/keys.ts | 5 +- src/ng-pipes/pipes/object/omit.ts | 7 +- src/ng-pipes/pipes/object/pairs.spec.ts | 10 +- src/ng-pipes/pipes/object/pairs.ts | 5 +- src/ng-pipes/pipes/object/pick.ts | 5 +- src/ng-pipes/pipes/object/values.ts | 7 +- src/ng-pipes/pipes/string/a-or-an.ts | 1 + src/ng-pipes/pipes/string/camelize.ts | 5 +- src/ng-pipes/pipes/string/index.ts | 3 +- src/ng-pipes/pipes/string/latinise.ts | 1657 +++++++++-------- src/ng-pipes/pipes/string/lines.ts | 5 +- src/ng-pipes/pipes/string/lpad.ts | 5 +- src/ng-pipes/pipes/string/ltrim.ts | 5 +- src/ng-pipes/pipes/string/match.ts | 5 +- src/ng-pipes/pipes/string/pluralize.ts | 1 + src/ng-pipes/pipes/string/repeat.ts | 5 +- src/ng-pipes/pipes/string/rpad.ts | 5 +- src/ng-pipes/pipes/string/rtrim.ts | 5 +- src/ng-pipes/pipes/string/scan.ts | 5 +- src/ng-pipes/pipes/string/shorten.ts | 5 +- src/ng-pipes/pipes/string/slugify.ts | 5 +- src/ng-pipes/pipes/string/strip-tags.ts | 5 +- src/ng-pipes/pipes/string/test.ts | 5 +- src/ng-pipes/pipes/string/trim.ts | 5 +- src/ng-pipes/pipes/string/ucfirst.ts | 5 +- src/ng-pipes/pipes/string/ucwords.ts | 5 +- src/ng-pipes/pipes/string/underscore.ts | 5 +- src/ng-pipes/pipes/string/wrap.ts | 5 +- 97 files changed, 1281 insertions(+), 972 deletions(-) diff --git a/src/ng-pipes/pipes/array/chunk.ts b/src/ng-pipes/pipes/array/chunk.ts index 5e0a3b59..3ecc2fbf 100644 --- a/src/ng-pipes/pipes/array/chunk.ts +++ b/src/ng-pipes/pipes/array/chunk.ts @@ -1,12 +1,14 @@ import { Pipe, PipeTransform } from '@angular/core'; import { isString } from '../helpers/helpers'; -@Pipe({ name: 'chunk' }) +@Pipe({ + name: 'chunk', + standalone: true, +}) export class ChunkPipe implements PipeTransform { transform(input: any, size: number = 1): any { if (isString(input)) { - return this.chunk(input - .split(''), size); + return this.chunk(input.split(''), size); } return Array.isArray(input) ? this.chunk(input, size) : input; @@ -16,6 +18,6 @@ export class ChunkPipe implements PipeTransform { return Array(Math.ceil(input.length / size)) .fill([]) .map((_, index) => index * size) - .map(begin => input.slice(begin, begin + size)); + .map((begin) => input.slice(begin, begin + size)); } } diff --git a/src/ng-pipes/pipes/array/diff.ts b/src/ng-pipes/pipes/array/diff.ts index f35fe915..53cb0300 100644 --- a/src/ng-pipes/pipes/array/diff.ts +++ b/src/ng-pipes/pipes/array/diff.ts @@ -1,6 +1,9 @@ import { Pipe, PipeTransform } from '@angular/core'; -@Pipe({ name: 'diff' }) +@Pipe({ + name: 'diff', + standalone: true, +}) export class DiffPipe implements PipeTransform { transform(input: T, ...args: any[]): T; transform(input: any[], ...args: any[]): any[]; diff --git a/src/ng-pipes/pipes/array/every.ts b/src/ng-pipes/pipes/array/every.ts index 2a4bb907..2e8cfc41 100644 --- a/src/ng-pipes/pipes/array/every.ts +++ b/src/ng-pipes/pipes/array/every.ts @@ -1,6 +1,9 @@ import { Pipe, PipeTransform } from '@angular/core'; -@Pipe({ name: 'every' }) +@Pipe({ + name: 'every', + standalone: true, +}) export class EveryPipe implements PipeTransform { transform(input: any, predicate: (value: any, index: number, array: any[]) => boolean): boolean | any[] { return Array.isArray(input) ? input.every(predicate) : false; diff --git a/src/ng-pipes/pipes/array/filter-by-impure.ts b/src/ng-pipes/pipes/array/filter-by-impure.ts index 7a31bb77..01d21ce5 100644 --- a/src/ng-pipes/pipes/array/filter-by-impure.ts +++ b/src/ng-pipes/pipes/array/filter-by-impure.ts @@ -2,5 +2,9 @@ import { Pipe } from '@angular/core'; import { FilterByPipe } from './filter-by'; // tslint:disable use-pipe-transform-interface -@Pipe({ name: 'filterByImpure', pure: false }) +@Pipe({ + name: 'filterByImpure', + pure: false, + standalone: true, +}) export class FilterByImpurePipe extends FilterByPipe {} diff --git a/src/ng-pipes/pipes/array/filter-by.ts b/src/ng-pipes/pipes/array/filter-by.ts index c6fa0157..a43669f6 100644 --- a/src/ng-pipes/pipes/array/filter-by.ts +++ b/src/ng-pipes/pipes/array/filter-by.ts @@ -9,7 +9,10 @@ import { } from '../helpers/helpers'; // tslint:disable no-bitwise -@Pipe({ name: 'filterBy' }) +@Pipe({ + name: 'filterBy', + standalone: true, +}) export class FilterByPipe implements PipeTransform { transform(input: T, props: Array, search?: any, strict?: boolean): T; transform(input: any[], props: Array, search?: any, strict?: boolean): any[]; @@ -21,19 +24,17 @@ export class FilterByPipe implements PipeTransform { return input; } - const terms = String(search) - .toLowerCase() - .split(','); + const terms = String(search).toLowerCase().split(','); - return input.filter(obj => { - return props.some(prop => { - return terms.some(term => { + return input.filter((obj) => { + return props.some((prop) => { + return terms.some((term) => { const value = extractDeepPropertyByMapKey(obj, prop); /* tslint:disable */ const { props, tail } = extractDeepPropertyByParentMapKey(obj, prop); if (isUndefined(value) && !isUndefined(props) && Array.isArray(props)) { - return props.some(parent => { + return props.some((parent) => { const str = String(parent[tail]).toLowerCase(); return strict ? str === term : !!~str.indexOf(term); diff --git a/src/ng-pipes/pipes/array/flatten.ts b/src/ng-pipes/pipes/array/flatten.ts index 26bab36c..4ffb871c 100644 --- a/src/ng-pipes/pipes/array/flatten.ts +++ b/src/ng-pipes/pipes/array/flatten.ts @@ -1,6 +1,9 @@ import { Pipe, PipeTransform } from '@angular/core'; -@Pipe({ name: 'flatten' }) +@Pipe({ + name: 'flatten', + standalone: true, +}) export class FlattenPipe implements PipeTransform { transform(input: T, shallow?: boolean): T; transform(input: any[], shallow?: boolean): any[]; diff --git a/src/ng-pipes/pipes/array/from-pairs.spec.ts b/src/ng-pipes/pipes/array/from-pairs.spec.ts index 318951ad..01055709 100644 --- a/src/ng-pipes/pipes/array/from-pairs.spec.ts +++ b/src/ng-pipes/pipes/array/from-pairs.spec.ts @@ -15,7 +15,12 @@ describe('FromPairsPipe', () => { it('should transform array to object', () => { expect(pipe.transform([['foo', 42]])).toEqual({ foo: 42 }); - expect(pipe.transform([['foo', 42], ['bar', 'foobar']])).toEqual({ foo: 42, bar: 'foobar' }); + expect( + pipe.transform([ + ['foo', 42], + ['bar', 'foobar'], + ]) + ).toEqual({ foo: 42, bar: 'foobar' }); }); it('should ignore non-array elements', () => { diff --git a/src/ng-pipes/pipes/array/from-pairs.ts b/src/ng-pipes/pipes/array/from-pairs.ts index d228a73a..3fffd091 100644 --- a/src/ng-pipes/pipes/array/from-pairs.ts +++ b/src/ng-pipes/pipes/array/from-pairs.ts @@ -1,6 +1,9 @@ import { Pipe, PipeTransform } from '@angular/core'; -@Pipe({ name: 'fromPairs' }) +@Pipe({ + name: 'fromPairs', + standalone: true, +}) export class FromPairsPipe implements PipeTransform { transform(input: any): any { if (!Array.isArray(input)) { diff --git a/src/ng-pipes/pipes/array/group-by-impure.ts b/src/ng-pipes/pipes/array/group-by-impure.ts index cd7b5f30..ba8c1ef6 100644 --- a/src/ng-pipes/pipes/array/group-by-impure.ts +++ b/src/ng-pipes/pipes/array/group-by-impure.ts @@ -2,5 +2,9 @@ import { Pipe } from '@angular/core'; import { GroupByPipe } from './group-by'; // tslint:disable use-pipe-transform-interface -@Pipe({ name: 'groupByImpure', pure: false }) +@Pipe({ + name: 'groupByImpure', + pure: false, + standalone: true, +}) export class GroupByImpurePipe extends GroupByPipe {} diff --git a/src/ng-pipes/pipes/array/group-by.spec.ts b/src/ng-pipes/pipes/array/group-by.spec.ts index 4080f8d0..7be9bd8f 100644 --- a/src/ng-pipes/pipes/array/group-by.spec.ts +++ b/src/ng-pipes/pipes/array/group-by.spec.ts @@ -46,8 +46,14 @@ describe('GroupByPipe', () => { ]; const result = pipe.transform(arrayWithDiscriminator, ['key', 'type'], '_'); expect(result).toEqual({ - foo_1: [{ id: 1, key: 'foo', type: 1 }, { id: 3, key: 'foo', type: 1 }], - foo_2: [{ id: 2, key: 'foo', type: 2 }, { id: 4, key: 'foo', type: 2 }], + foo_1: [ + { id: 1, key: 'foo', type: 1 }, + { id: 3, key: 'foo', type: 1 }, + ], + foo_2: [ + { id: 2, key: 'foo', type: 2 }, + { id: 4, key: 'foo', type: 2 }, + ], }); }); @@ -60,8 +66,14 @@ describe('GroupByPipe', () => { ]; const result = pipe.transform(arrayWithDiscriminator, ['key', 'type']); expect(result).toEqual({ - 'foo|1': [{ id: 1, key: 'foo', type: 1 }, { id: 3, key: 'foo', type: 1 }], - 'foo|2': [{ id: 2, key: 'foo', type: 2 }, { id: 4, key: 'foo', type: 2 }], + 'foo|1': [ + { id: 1, key: 'foo', type: 1 }, + { id: 3, key: 'foo', type: 1 }, + ], + 'foo|2': [ + { id: 2, key: 'foo', type: 2 }, + { id: 4, key: 'foo', type: 2 }, + ], }); }); @@ -74,8 +86,14 @@ describe('GroupByPipe', () => { ]; const result = pipe.transform(arrayWithDiscriminator, 'prop.deep'); expect(result).toEqual({ - foo: [{ id: 1, prop: { deep: 'foo' } }, { id: 3, prop: { deep: 'foo' } }], - bar: [{ id: 2, prop: { deep: 'bar' } }, { id: 4, prop: { deep: 'bar' } }], + foo: [ + { id: 1, prop: { deep: 'foo' } }, + { id: 3, prop: { deep: 'foo' } }, + ], + bar: [ + { id: 2, prop: { deep: 'bar' } }, + { id: 4, prop: { deep: 'bar' } }, + ], }); }); @@ -88,8 +106,14 @@ describe('GroupByPipe', () => { ]; const result = pipe.transform(arrayWithDiscriminator, ['prop.deep', 'prop.type']); expect(result).toEqual({ - 'foo|1': [{ id: 1, prop: { deep: 'foo', type: 1 } }, { id: 3, prop: { deep: 'foo', type: 1 } }], - 'foo|2': [{ id: 2, prop: { deep: 'foo', type: 2 } }, { id: 4, prop: { deep: 'foo', type: 2 } }], + 'foo|1': [ + { id: 1, prop: { deep: 'foo', type: 1 } }, + { id: 3, prop: { deep: 'foo', type: 1 } }, + ], + 'foo|2': [ + { id: 2, prop: { deep: 'foo', type: 2 } }, + { id: 4, prop: { deep: 'foo', type: 2 } }, + ], }); }); }); diff --git a/src/ng-pipes/pipes/array/group-by.ts b/src/ng-pipes/pipes/array/group-by.ts index 14a1d4f0..ed18fe06 100644 --- a/src/ng-pipes/pipes/array/group-by.ts +++ b/src/ng-pipes/pipes/array/group-by.ts @@ -1,7 +1,10 @@ import { Pipe, PipeTransform } from '@angular/core'; import { extractDeepPropertyByMapKey, isFunction } from '../helpers/helpers'; -@Pipe({ name: 'groupBy' }) +@Pipe({ + name: 'groupBy', + standalone: true, +}) export class GroupByPipe implements PipeTransform { transform(input: any, discriminator: any = [], delimiter: string = '|'): any { if (!Array.isArray(input)) { @@ -27,7 +30,7 @@ export class GroupByPipe implements PipeTransform { } if (Array.isArray(discriminator)) { - return discriminator.map(k => extractDeepPropertyByMapKey(payload, k)).join(delimiter); + return discriminator.map((k) => extractDeepPropertyByMapKey(payload, k)).join(delimiter); } return extractDeepPropertyByMapKey(payload, discriminator); diff --git a/src/ng-pipes/pipes/array/index.ts b/src/ng-pipes/pipes/array/index.ts index 6c71f01f..187a8f0c 100644 --- a/src/ng-pipes/pipes/array/index.ts +++ b/src/ng-pipes/pipes/array/index.ts @@ -48,12 +48,11 @@ const ARRAY_PIPES = [ OrderByImpurePipe, RangePipe, ChunkPipe, - FromPairsPipe + FromPairsPipe, ]; @NgModule({ - declarations: ARRAY_PIPES, - imports: [], + imports: [...ARRAY_PIPES], exports: ARRAY_PIPES, }) export class NgArrayPipesModule {} diff --git a/src/ng-pipes/pipes/array/initial.ts b/src/ng-pipes/pipes/array/initial.ts index 0fefa163..c3bb8db7 100644 --- a/src/ng-pipes/pipes/array/initial.ts +++ b/src/ng-pipes/pipes/array/initial.ts @@ -1,6 +1,9 @@ import { Pipe, PipeTransform } from '@angular/core'; -@Pipe({ name: 'initial' }) +@Pipe({ + name: 'initial', + standalone: true, +}) export class InitialPipe implements PipeTransform { transform(input: any[], num: number): any[]; transform(input: any): any; diff --git a/src/ng-pipes/pipes/array/intersection.ts b/src/ng-pipes/pipes/array/intersection.ts index c5b58d66..443680d4 100644 --- a/src/ng-pipes/pipes/array/intersection.ts +++ b/src/ng-pipes/pipes/array/intersection.ts @@ -1,6 +1,9 @@ import { Pipe, PipeTransform } from '@angular/core'; -@Pipe({ name: 'intersection' }) +@Pipe({ + name: 'intersection', + standalone: true, +}) export class IntersectionPipe implements PipeTransform { transform(input: T, ...args: any[]): T; transform(input: any[], ...args: any[]): any[]; diff --git a/src/ng-pipes/pipes/array/order-by-impure.ts b/src/ng-pipes/pipes/array/order-by-impure.ts index 74a0b801..2317a435 100644 --- a/src/ng-pipes/pipes/array/order-by-impure.ts +++ b/src/ng-pipes/pipes/array/order-by-impure.ts @@ -2,5 +2,9 @@ import { Pipe } from '@angular/core'; import { OrderByPipe } from './order-by'; // tslint:disable use-pipe-transform-interface -@Pipe({ name: 'orderByImpure', pure: false }) +@Pipe({ + name: 'orderByImpure', + pure: false, + standalone: true, +}) export class OrderByImpurePipe extends OrderByPipe {} diff --git a/src/ng-pipes/pipes/array/order-by.spec.ts b/src/ng-pipes/pipes/array/order-by.spec.ts index 81cb7fd9..1a3796e2 100644 --- a/src/ng-pipes/pipes/array/order-by.spec.ts +++ b/src/ng-pipes/pipes/array/order-by.spec.ts @@ -98,10 +98,20 @@ describe('OrderByPipe', () => { it('should order by a property of type boolean', () => { expect( pipe.transform( - [{ id: 1, value: false }, { id: 2, value: true }, { id: 3, value: false }, { id: 4, value: true }], + [ + { id: 1, value: false }, + { id: 2, value: true }, + { id: 3, value: false }, + { id: 4, value: true }, + ], 'value' ) - ).toEqual([{ id: 1, value: false }, { id: 3, value: false }, { id: 2, value: true }, { id: 4, value: true }]); + ).toEqual([ + { id: 1, value: false }, + { id: 3, value: false }, + { id: 2, value: true }, + { id: 4, value: true }, + ]); }); it('should order by a property of type date', () => { diff --git a/src/ng-pipes/pipes/array/order-by.ts b/src/ng-pipes/pipes/array/order-by.ts index 42a56c59..5f8f59d5 100644 --- a/src/ng-pipes/pipes/array/order-by.ts +++ b/src/ng-pipes/pipes/array/order-by.ts @@ -1,7 +1,10 @@ import { Pipe, PipeTransform } from '@angular/core'; import { extractDeepPropertyByMapKey, isString, isUndefined } from '../helpers/helpers'; -@Pipe({ name: 'orderBy' }) +@Pipe({ + name: 'orderBy', + standalone: true, +}) export class OrderByPipe implements PipeTransform { transform(input: T, config?: any): T; transform(input: any[], config?: any): any[]; diff --git a/src/ng-pipes/pipes/array/pluck.ts b/src/ng-pipes/pipes/array/pluck.ts index fdd7b4c3..e22a7975 100644 --- a/src/ng-pipes/pipes/array/pluck.ts +++ b/src/ng-pipes/pipes/array/pluck.ts @@ -1,7 +1,11 @@ import { Pipe, PipeTransform } from '@angular/core'; import { extractDeepPropertyByMapKey, isObject } from '../helpers/helpers'; -@Pipe({ name: 'pluck', pure: false }) +@Pipe({ + name: 'pluck', + pure: false, + standalone: true, +}) export class PluckPipe implements PipeTransform { transform(input: T, map: keyof T): T[K]; transform(input: any[], map: string): any[]; @@ -9,7 +13,7 @@ export class PluckPipe implements PipeTransform { transform(input: any, map: string): any { if (Array.isArray(input)) { - return input.map(e => extractDeepPropertyByMapKey(e, map)); + return input.map((e) => extractDeepPropertyByMapKey(e, map)); } return isObject(input) ? extractDeepPropertyByMapKey(input, map) : input; diff --git a/src/ng-pipes/pipes/array/range.ts b/src/ng-pipes/pipes/array/range.ts index e9763953..7dcfd034 100644 --- a/src/ng-pipes/pipes/array/range.ts +++ b/src/ng-pipes/pipes/array/range.ts @@ -1,6 +1,9 @@ import { Pipe, PipeTransform } from '@angular/core'; -@Pipe({ name: 'range' }) +@Pipe({ + name: 'range', + standalone: true, +}) export class RangePipe implements PipeTransform { transform(start: number = 1, count: number = 0, step: number = 1): any { return Array(count) diff --git a/src/ng-pipes/pipes/array/reverse.ts b/src/ng-pipes/pipes/array/reverse.ts index ec4e908b..0eff5154 100644 --- a/src/ng-pipes/pipes/array/reverse.ts +++ b/src/ng-pipes/pipes/array/reverse.ts @@ -1,14 +1,14 @@ import { Pipe, PipeTransform } from '@angular/core'; import { isString } from '../helpers/helpers'; -@Pipe({ name: 'reverse' }) +@Pipe({ + name: 'reverse', + standalone: true, +}) export class ReversePipe implements PipeTransform { transform(input: any): any { if (isString(input)) { - return input - .split('') - .reverse() - .join(''); + return input.split('').reverse().join(''); } return Array.isArray(input) ? input.slice().reverse() : input; diff --git a/src/ng-pipes/pipes/array/sample.ts b/src/ng-pipes/pipes/array/sample.ts index 9ce003b2..89bea5e3 100644 --- a/src/ng-pipes/pipes/array/sample.ts +++ b/src/ng-pipes/pipes/array/sample.ts @@ -1,6 +1,9 @@ import { Pipe, PipeTransform } from '@angular/core'; -@Pipe({ name: 'sample' }) +@Pipe({ + name: 'sample', + standalone: true, +}) export class SamplePipe implements PipeTransform { transform(input: any[], len?: number): any[]; transform(input: T, len?: number): T; diff --git a/src/ng-pipes/pipes/array/shuffle.ts b/src/ng-pipes/pipes/array/shuffle.ts index 6407e83f..eacf2cc4 100644 --- a/src/ng-pipes/pipes/array/shuffle.ts +++ b/src/ng-pipes/pipes/array/shuffle.ts @@ -1,6 +1,9 @@ import { Pipe, PipeTransform } from '@angular/core'; -@Pipe({ name: 'shuffle' }) +@Pipe({ + name: 'shuffle', + standalone: true, +}) export class ShufflePipe implements PipeTransform { transform(input: T): T; transform(input: any[]): any[]; diff --git a/src/ng-pipes/pipes/array/some.ts b/src/ng-pipes/pipes/array/some.ts index 223ea440..4673090b 100644 --- a/src/ng-pipes/pipes/array/some.ts +++ b/src/ng-pipes/pipes/array/some.ts @@ -1,6 +1,9 @@ import { Pipe, PipeTransform } from '@angular/core'; -@Pipe({ name: 'some' }) +@Pipe({ + name: 'some', + standalone: true, +}) export class SomePipe implements PipeTransform { transform(input: any[], predicate: (value: any, index: number, array: any[]) => boolean): boolean; transform(input: T, predicate: (value: any, index: number, array: any[]) => boolean): T; diff --git a/src/ng-pipes/pipes/array/tail.ts b/src/ng-pipes/pipes/array/tail.ts index a9fdd989..677f9ace 100644 --- a/src/ng-pipes/pipes/array/tail.ts +++ b/src/ng-pipes/pipes/array/tail.ts @@ -1,6 +1,9 @@ import { Pipe, PipeTransform } from '@angular/core'; -@Pipe({ name: 'tail' }) +@Pipe({ + name: 'tail', + standalone: true, +}) export class TailPipe implements PipeTransform { transform(input: T, num?: number): T; transform(input: any[], num?: number): any[]; diff --git a/src/ng-pipes/pipes/array/truthify.ts b/src/ng-pipes/pipes/array/truthify.ts index 64d287d3..f449401c 100644 --- a/src/ng-pipes/pipes/array/truthify.ts +++ b/src/ng-pipes/pipes/array/truthify.ts @@ -1,11 +1,14 @@ import { Pipe, PipeTransform } from '@angular/core'; -@Pipe({ name: 'truthify' }) +@Pipe({ + name: 'truthify', + standalone: true, +}) export class TrurthifyPipe implements PipeTransform { transform(input: any[]): any[]; transform(input: T): T; transform(input: any): any { - return Array.isArray(input) ? input.filter(e => !!e) : input; + return Array.isArray(input) ? input.filter((e) => !!e) : input; } } diff --git a/src/ng-pipes/pipes/array/union.spec.ts b/src/ng-pipes/pipes/array/union.spec.ts index 4011f5f0..dfb02b2e 100644 --- a/src/ng-pipes/pipes/array/union.spec.ts +++ b/src/ng-pipes/pipes/array/union.spec.ts @@ -30,8 +30,32 @@ describe('UnionPipe', () => { expect(pipe.transform([1, 2, 3], [[1, 2, 3, 4, 5, 6]])).toEqual([1, 2, 3, 4, 5, 6]); }); it('should union multiple arrays with duplicate values, and remove the intersection', () => { - expect(pipe.transform([1, 2, 3], [[1, 2, 3], [4, 5, 6]])).toEqual([1, 2, 3, 4, 5, 6]); - expect(pipe.transform([1, 2, 3, 4], [[1, 2, 3], [5, 6]])).toEqual([1, 2, 3, 4, 5, 6]); - expect(pipe.transform([1, 2, 3, 4], [[1, 2, 3, 5], [5, 6]])).toEqual([1, 2, 3, 4, 5, 6]); + expect( + pipe.transform( + [1, 2, 3], + [ + [1, 2, 3], + [4, 5, 6], + ] + ) + ).toEqual([1, 2, 3, 4, 5, 6]); + expect( + pipe.transform( + [1, 2, 3, 4], + [ + [1, 2, 3], + [5, 6], + ] + ) + ).toEqual([1, 2, 3, 4, 5, 6]); + expect( + pipe.transform( + [1, 2, 3, 4], + [ + [1, 2, 3, 5], + [5, 6], + ] + ) + ).toEqual([1, 2, 3, 4, 5, 6]); }); }); diff --git a/src/ng-pipes/pipes/array/union.ts b/src/ng-pipes/pipes/array/union.ts index 6f7e8e5d..30ecd16f 100644 --- a/src/ng-pipes/pipes/array/union.ts +++ b/src/ng-pipes/pipes/array/union.ts @@ -1,6 +1,9 @@ import { Pipe, PipeTransform } from '@angular/core'; -@Pipe({ name: 'union' }) +@Pipe({ + name: 'union', + standalone: true, +}) export class UnionPipe implements PipeTransform { transform(input: T, args?: any[]): T; transform(input: any[], args?: any[]): any[]; diff --git a/src/ng-pipes/pipes/array/unique.spec.ts b/src/ng-pipes/pipes/array/unique.spec.ts index 15323658..b9444ae2 100644 --- a/src/ng-pipes/pipes/array/unique.spec.ts +++ b/src/ng-pipes/pipes/array/unique.spec.ts @@ -24,7 +24,16 @@ describe('DiffPipe', () => { }); it('should filter the array based on object properties when a property name is supplied in arguments', () => { - expect(pipe.transform([{ a: 1, b: true }, { a: 1, b: true }, { a: 3, b: false }], 'b')).toEqual([ + expect( + pipe.transform( + [ + { a: 1, b: true }, + { a: 1, b: true }, + { a: 3, b: false }, + ], + 'b' + ) + ).toEqual([ { a: 1, b: true }, { a: 3, b: false }, ]); diff --git a/src/ng-pipes/pipes/array/unique.ts b/src/ng-pipes/pipes/array/unique.ts index ea3c116f..95e475d6 100644 --- a/src/ng-pipes/pipes/array/unique.ts +++ b/src/ng-pipes/pipes/array/unique.ts @@ -1,7 +1,10 @@ import { Pipe, PipeTransform } from '@angular/core'; import { extractDeepPropertyByMapKey, isObject, isUndefined } from '../helpers/helpers'; -@Pipe({ name: 'unique' }) +@Pipe({ + name: 'unique', + standalone: true, +}) export class UniquePipe implements PipeTransform { transform(input: any[], args?: string | undefined): any[]; transform(input: T, args?: string | undefined): T; diff --git a/src/ng-pipes/pipes/array/without.ts b/src/ng-pipes/pipes/array/without.ts index 1f87123d..9072356c 100644 --- a/src/ng-pipes/pipes/array/without.ts +++ b/src/ng-pipes/pipes/array/without.ts @@ -1,6 +1,9 @@ import { Pipe, PipeTransform } from '@angular/core'; -@Pipe({ name: 'without' }) +@Pipe({ + name: 'without', + standalone: true, +}) export class WithoutPipe implements PipeTransform { transform(input: any[], args?: any[]): any[]; transform(input: any, args?: any[]): any; @@ -8,7 +11,7 @@ export class WithoutPipe implements PipeTransform { transform(input: any, args: any[] = []): any[] { return Array.isArray(input) ? // tslint:disable-next-line:no-bitwise - input.filter(e => !~args.indexOf(e)) + input.filter((e) => !~args.indexOf(e)) : input; } } diff --git a/src/ng-pipes/pipes/boolean/index.ts b/src/ng-pipes/pipes/boolean/index.ts index 402328f8..919cd952 100644 --- a/src/ng-pipes/pipes/boolean/index.ts +++ b/src/ng-pipes/pipes/boolean/index.ts @@ -37,8 +37,7 @@ export const BOOLEAN_PIPES = [ ]; @NgModule({ - declarations: BOOLEAN_PIPES, - imports: [], + imports: [...BOOLEAN_PIPES], exports: BOOLEAN_PIPES, }) export class NgBooleanPipesModule {} diff --git a/src/ng-pipes/pipes/boolean/is-array.ts b/src/ng-pipes/pipes/boolean/is-array.ts index 8d0e8c24..fd1f64eb 100644 --- a/src/ng-pipes/pipes/boolean/is-array.ts +++ b/src/ng-pipes/pipes/boolean/is-array.ts @@ -1,6 +1,9 @@ import { Pipe, PipeTransform } from '@angular/core'; -@Pipe({ name: 'isArray' }) +@Pipe({ + name: 'isArray', + standalone: true, +}) export class IsArrayPipe implements PipeTransform { transform(input: any): boolean { return Array.isArray(input); diff --git a/src/ng-pipes/pipes/boolean/is-defined.ts b/src/ng-pipes/pipes/boolean/is-defined.ts index 1b308914..58dc7126 100644 --- a/src/ng-pipes/pipes/boolean/is-defined.ts +++ b/src/ng-pipes/pipes/boolean/is-defined.ts @@ -1,7 +1,10 @@ import { Pipe, PipeTransform } from '@angular/core'; import { isUndefined } from '../helpers/helpers'; -@Pipe({ name: 'isDefined' }) +@Pipe({ + name: 'isDefined', + standalone: true, +}) export class IsDefinedPipe implements PipeTransform { transform(input: any): boolean { return !isUndefined(input); diff --git a/src/ng-pipes/pipes/boolean/is-equal-to.ts b/src/ng-pipes/pipes/boolean/is-equal-to.ts index 227b872a..55c1bc3f 100644 --- a/src/ng-pipes/pipes/boolean/is-equal-to.ts +++ b/src/ng-pipes/pipes/boolean/is-equal-to.ts @@ -1,6 +1,9 @@ import { Pipe, PipeTransform } from '@angular/core'; -@Pipe({ name: 'isEqualTo' }) +@Pipe({ + name: 'isEqualTo', + standalone: true, +}) export class IsEqualToPipe implements PipeTransform { transform(input: any, other: any): boolean { // tslint:disable-next-line:triple-equals diff --git a/src/ng-pipes/pipes/boolean/is-function.spec.ts b/src/ng-pipes/pipes/boolean/is-function.spec.ts index 44e285f4..2b04dbeb 100644 --- a/src/ng-pipes/pipes/boolean/is-function.spec.ts +++ b/src/ng-pipes/pipes/boolean/is-function.spec.ts @@ -13,6 +13,6 @@ describe('IsFunctionPipe', () => { expect(pipe.transform(1)).toBeFalsy(); expect(pipe.transform('')).toBeFalsy(); expect(pipe.transform(() => {})).toBeTruthy(); - expect(pipe.transform(function() {})).toBeTruthy(); + expect(pipe.transform(function () {})).toBeTruthy(); }); }); diff --git a/src/ng-pipes/pipes/boolean/is-function.ts b/src/ng-pipes/pipes/boolean/is-function.ts index 0870332c..5d353457 100644 --- a/src/ng-pipes/pipes/boolean/is-function.ts +++ b/src/ng-pipes/pipes/boolean/is-function.ts @@ -1,7 +1,10 @@ import { Pipe, PipeTransform } from '@angular/core'; import { isFunction } from '../helpers/helpers'; -@Pipe({ name: 'isFunction' }) +@Pipe({ + name: 'isFunction', + standalone: true, +}) export class IsFunctionPipe implements PipeTransform { transform(input: any): boolean { return isFunction(input); diff --git a/src/ng-pipes/pipes/boolean/is-greater-equal-than.ts b/src/ng-pipes/pipes/boolean/is-greater-equal-than.ts index 6acb8802..1a9d7200 100644 --- a/src/ng-pipes/pipes/boolean/is-greater-equal-than.ts +++ b/src/ng-pipes/pipes/boolean/is-greater-equal-than.ts @@ -1,6 +1,9 @@ import { Pipe, PipeTransform } from '@angular/core'; -@Pipe({ name: 'isGreaterEqualThan' }) +@Pipe({ + name: 'isGreaterEqualThan', + standalone: true, +}) export class IsGreaterEqualThanPipe implements PipeTransform { transform(input: number, other: number): boolean { return input >= other; diff --git a/src/ng-pipes/pipes/boolean/is-greater-than.ts b/src/ng-pipes/pipes/boolean/is-greater-than.ts index a65a88f3..d52913e1 100644 --- a/src/ng-pipes/pipes/boolean/is-greater-than.ts +++ b/src/ng-pipes/pipes/boolean/is-greater-than.ts @@ -1,6 +1,9 @@ import { Pipe, PipeTransform } from '@angular/core'; -@Pipe({ name: 'isGreaterThan' }) +@Pipe({ + name: 'isGreaterThan', + standalone: true, +}) export class IsGreaterThanPipe implements PipeTransform { transform(input: number, other: number): boolean { return input > other; diff --git a/src/ng-pipes/pipes/boolean/is-identical-to.ts b/src/ng-pipes/pipes/boolean/is-identical-to.ts index f5d35a12..f313eba1 100644 --- a/src/ng-pipes/pipes/boolean/is-identical-to.ts +++ b/src/ng-pipes/pipes/boolean/is-identical-to.ts @@ -1,6 +1,9 @@ import { Pipe, PipeTransform } from '@angular/core'; -@Pipe({ name: 'isIdenticalTo' }) +@Pipe({ + name: 'isIdenticalTo', + standalone: true, +}) export class IsIdenticalToPipe implements PipeTransform { transform(input: any, other: any): boolean { return input === other; diff --git a/src/ng-pipes/pipes/boolean/is-less-equal-than.ts b/src/ng-pipes/pipes/boolean/is-less-equal-than.ts index 43da5d1b..fb239263 100644 --- a/src/ng-pipes/pipes/boolean/is-less-equal-than.ts +++ b/src/ng-pipes/pipes/boolean/is-less-equal-than.ts @@ -1,6 +1,9 @@ import { Pipe, PipeTransform } from '@angular/core'; -@Pipe({ name: 'isLessEqualThan' }) +@Pipe({ + name: 'isLessEqualThan', + standalone: true, +}) export class IsLessEqualThanPipe implements PipeTransform { transform(input: number, other: number): boolean { return input <= other; diff --git a/src/ng-pipes/pipes/boolean/is-less-than.ts b/src/ng-pipes/pipes/boolean/is-less-than.ts index a8e71323..8480f72d 100644 --- a/src/ng-pipes/pipes/boolean/is-less-than.ts +++ b/src/ng-pipes/pipes/boolean/is-less-than.ts @@ -1,6 +1,9 @@ import { Pipe, PipeTransform } from '@angular/core'; -@Pipe({ name: 'isLessThan' }) +@Pipe({ + name: 'isLessThan', + standalone: true, +}) export class IsLessThanPipe implements PipeTransform { transform(input: number, other: number): boolean { return input < other; diff --git a/src/ng-pipes/pipes/boolean/is-not-equal-to.ts b/src/ng-pipes/pipes/boolean/is-not-equal-to.ts index 8bea6725..38906c04 100644 --- a/src/ng-pipes/pipes/boolean/is-not-equal-to.ts +++ b/src/ng-pipes/pipes/boolean/is-not-equal-to.ts @@ -1,6 +1,9 @@ import { Pipe, PipeTransform } from '@angular/core'; -@Pipe({ name: 'isNotEqualTo' }) +@Pipe({ + name: 'isNotEqualTo', + standalone: true, +}) export class IsNotEqualToPipe implements PipeTransform { transform(input: any, other: any): boolean { // tslint:disable-next-line:triple-equals diff --git a/src/ng-pipes/pipes/boolean/is-not-identical-to.ts b/src/ng-pipes/pipes/boolean/is-not-identical-to.ts index 0268d0ca..6d6233c5 100644 --- a/src/ng-pipes/pipes/boolean/is-not-identical-to.ts +++ b/src/ng-pipes/pipes/boolean/is-not-identical-to.ts @@ -1,6 +1,9 @@ import { Pipe, PipeTransform } from '@angular/core'; -@Pipe({ name: 'isNotIdenticalTo' }) +@Pipe({ + name: 'isNotIdenticalTo', + standalone: true, +}) export class IsNotIdenticalToPipe implements PipeTransform { transform(input: any, other: any): boolean { return input !== other; diff --git a/src/ng-pipes/pipes/boolean/is-null.ts b/src/ng-pipes/pipes/boolean/is-null.ts index 8cc5dac4..a8a596fc 100644 --- a/src/ng-pipes/pipes/boolean/is-null.ts +++ b/src/ng-pipes/pipes/boolean/is-null.ts @@ -1,6 +1,9 @@ import { Pipe, PipeTransform } from '@angular/core'; -@Pipe({ name: 'isNull' }) +@Pipe({ + name: 'isNull', + standalone: true, +}) export class IsNullPipe implements PipeTransform { transform(input: any): boolean { return input === null; diff --git a/src/ng-pipes/pipes/boolean/is-number.ts b/src/ng-pipes/pipes/boolean/is-number.ts index f3faf54c..c2f6c907 100644 --- a/src/ng-pipes/pipes/boolean/is-number.ts +++ b/src/ng-pipes/pipes/boolean/is-number.ts @@ -1,7 +1,10 @@ import { Pipe, PipeTransform } from '@angular/core'; import { isNumber } from '../helpers/helpers'; -@Pipe({ name: 'isNumber' }) +@Pipe({ + name: 'isNumber', + standalone: true, +}) export class IsNumberPipe implements PipeTransform { transform(input: any): boolean { return isNumber(input); diff --git a/src/ng-pipes/pipes/boolean/is-object.ts b/src/ng-pipes/pipes/boolean/is-object.ts index 34321a22..4eb14d99 100644 --- a/src/ng-pipes/pipes/boolean/is-object.ts +++ b/src/ng-pipes/pipes/boolean/is-object.ts @@ -1,7 +1,10 @@ import { Pipe, PipeTransform } from '@angular/core'; import { isObject } from '../helpers/helpers'; -@Pipe({ name: 'isObject' }) +@Pipe({ + name: 'isObject', + standalone: true, +}) export class IsObjectPipe implements PipeTransform { transform(input: any): boolean { return isObject(input); diff --git a/src/ng-pipes/pipes/boolean/is-string.ts b/src/ng-pipes/pipes/boolean/is-string.ts index bf400571..1e2b168d 100644 --- a/src/ng-pipes/pipes/boolean/is-string.ts +++ b/src/ng-pipes/pipes/boolean/is-string.ts @@ -1,7 +1,10 @@ import { Pipe, PipeTransform } from '@angular/core'; import { isString } from '../helpers/helpers'; -@Pipe({ name: 'isString' }) +@Pipe({ + name: 'isString', + standalone: true, +}) export class IsStringPipe implements PipeTransform { transform(input: any): boolean { return isString(input); diff --git a/src/ng-pipes/pipes/boolean/is-undefined.ts b/src/ng-pipes/pipes/boolean/is-undefined.ts index 252110ce..7af097fc 100644 --- a/src/ng-pipes/pipes/boolean/is-undefined.ts +++ b/src/ng-pipes/pipes/boolean/is-undefined.ts @@ -1,7 +1,10 @@ import { Pipe, PipeTransform } from '@angular/core'; import { isUndefined } from '../helpers/helpers'; -@Pipe({ name: 'isUndefined' }) +@Pipe({ + name: 'isUndefined', + standalone: true, +}) export class IsUndefinedPipe implements PipeTransform { transform(input: any): boolean { return isUndefined(input); diff --git a/src/ng-pipes/pipes/date/index.ts b/src/ng-pipes/pipes/date/index.ts index e2ad0b8f..aa3b7bd2 100644 --- a/src/ng-pipes/pipes/date/index.ts +++ b/src/ng-pipes/pipes/date/index.ts @@ -4,8 +4,7 @@ import { TimeAgoPipe } from './time-ago'; export const DATE_PIPES = [TimeAgoPipe]; @NgModule({ - declarations: DATE_PIPES, - imports: [], + imports: [...DATE_PIPES], exports: DATE_PIPES, }) export class NgDatePipesModule {} diff --git a/src/ng-pipes/pipes/date/time-ago.ts b/src/ng-pipes/pipes/date/time-ago.ts index 65a5ac37..c93a6830 100644 --- a/src/ng-pipes/pipes/date/time-ago.ts +++ b/src/ng-pipes/pipes/date/time-ago.ts @@ -1,6 +1,9 @@ import { Pipe, PipeTransform } from '@angular/core'; -@Pipe({ name: 'timeAgo' }) +@Pipe({ + name: 'timeAgo', + standalone: true, +}) export class TimeAgoPipe implements PipeTransform { private static YEAR_MS: number = 1000 * 60 * 60 * 24 * 7 * 4 * 12; private static MAPPER: any = [ diff --git a/src/ng-pipes/pipes/helpers/helpers.ts b/src/ng-pipes/pipes/helpers/helpers.ts index e09f84b7..e44ddb5a 100644 --- a/src/ng-pipes/pipes/helpers/helpers.ts +++ b/src/ng-pipes/pipes/helpers/helpers.ts @@ -42,8 +42,7 @@ export function ucFirst(text: string) { const ucd = part .toLowerCase() .split(/(?=['|-])/g) - .map( - (word: any) => + .map((word: any) => word.indexOf('-') + word.indexOf("'") > -2 ? word.slice(0, 2).toUpperCase() + word.slice(2) : word.slice(0, 1).toUpperCase() + word.slice(1) @@ -89,16 +88,14 @@ export function isDeepEqual(obj: any, other: any): any { return obj === other; } - return getKeysTwoObjects(obj, other).every( - (key: any): boolean => { - if (!isObject(obj[key]) && !isObject(other[key])) { - return obj[key] === other[key]; - } - if (!isObject(obj[key]) || !isObject(other[key])) { - return false; - } - - return isDeepEqual(obj[key], other[key]); + return getKeysTwoObjects(obj, other).every((key: any): boolean => { + if (!isObject(obj[key]) && !isObject(other[key])) { + return obj[key] === other[key]; + } + if (!isObject(obj[key]) || !isObject(other[key])) { + return false; } - ); + + return isDeepEqual(obj[key], other[key]); + }); } diff --git a/src/ng-pipes/pipes/math/average.ts b/src/ng-pipes/pipes/math/average.ts index 2dba2e83..d7fae47d 100644 --- a/src/ng-pipes/pipes/math/average.ts +++ b/src/ng-pipes/pipes/math/average.ts @@ -4,7 +4,7 @@ import { isNumberFinite } from '../helpers/helpers'; @Pipe({ name: 'average' }) export class AveragePipe implements PipeTransform { transform(arr: number[]): string | number { - const isValid = arr.every(value => isNumberFinite(value)); + const isValid = arr.every((value) => isNumberFinite(value)); if (!isValid) { return NaN; diff --git a/src/ng-pipes/pipes/math/bytes.ts b/src/ng-pipes/pipes/math/bytes.ts index be1e97ee..2c0f7d60 100644 --- a/src/ng-pipes/pipes/math/bytes.ts +++ b/src/ng-pipes/pipes/math/bytes.ts @@ -1,7 +1,10 @@ import { Pipe, PipeTransform } from '@angular/core'; import { applyPrecision, isNumberFinite, isUndefined } from '../helpers/helpers'; -@Pipe({ name: 'bytes' }) +@Pipe({ + name: 'bytes', + standalone: true, +}) export class BytesPipe implements PipeTransform { private dictionary: Array<{ max: number; type: string }> = [ { max: 1024, type: 'B' }, @@ -15,7 +18,7 @@ export class BytesPipe implements PipeTransform { return NaN; } - const format = this.dictionary.find(d => value < d.max) || this.dictionary[this.dictionary.length - 1]; + const format = this.dictionary.find((d) => value < d.max) || this.dictionary[this.dictionary.length - 1]; const calc = value / (format.max / 1024); const num = isUndefined(precision) ? calc : applyPrecision(calc, precision); diff --git a/src/ng-pipes/pipes/math/ceil.ts b/src/ng-pipes/pipes/math/ceil.ts index 920571bd..c9fd75af 100644 --- a/src/ng-pipes/pipes/math/ceil.ts +++ b/src/ng-pipes/pipes/math/ceil.ts @@ -1,6 +1,9 @@ import { Pipe, PipeTransform } from '@angular/core'; -@Pipe({ name: 'ceil' }) +@Pipe({ + name: 'ceil', + standalone: true, +}) export class CeilPipe implements PipeTransform { transform(num: number, precision: number = 0): number { if (precision <= 0) { diff --git a/src/ng-pipes/pipes/math/degrees.ts b/src/ng-pipes/pipes/math/degrees.ts index 03c5f4be..983ff022 100644 --- a/src/ng-pipes/pipes/math/degrees.ts +++ b/src/ng-pipes/pipes/math/degrees.ts @@ -1,7 +1,10 @@ import { Pipe, PipeTransform } from '@angular/core'; import { isNumberFinite } from '../helpers/helpers'; -@Pipe({ name: 'degrees' }) +@Pipe({ + name: 'degrees', + standalone: true, +}) export class DegreesPipe implements PipeTransform { transform(radians: number): number { if (!isNumberFinite(radians)) { diff --git a/src/ng-pipes/pipes/math/floor.ts b/src/ng-pipes/pipes/math/floor.ts index 173df970..e842f6ce 100644 --- a/src/ng-pipes/pipes/math/floor.ts +++ b/src/ng-pipes/pipes/math/floor.ts @@ -1,6 +1,9 @@ import { Pipe, PipeTransform } from '@angular/core'; -@Pipe({ name: 'floor' }) +@Pipe({ + name: 'floor', + standalone: true, +}) export class FloorPipe implements PipeTransform { transform(num: number, precision: number = 0): number { if (precision <= 0) { diff --git a/src/ng-pipes/pipes/math/index.ts b/src/ng-pipes/pipes/math/index.ts index b1a2b226..b4290c67 100644 --- a/src/ng-pipes/pipes/math/index.ts +++ b/src/ng-pipes/pipes/math/index.ts @@ -28,8 +28,7 @@ export const MATH_PIPES = [ ]; @NgModule({ - declarations: MATH_PIPES, - imports: [], + imports: [...MATH_PIPES], exports: MATH_PIPES, }) export class NgMathPipesModule {} diff --git a/src/ng-pipes/pipes/math/max.ts b/src/ng-pipes/pipes/math/max.ts index 14477146..ceb33d21 100644 --- a/src/ng-pipes/pipes/math/max.ts +++ b/src/ng-pipes/pipes/math/max.ts @@ -1,6 +1,9 @@ import { Pipe, PipeTransform } from '@angular/core'; -@Pipe({ name: 'max' }) +@Pipe({ + name: 'max', + standalone: true, +}) export class MaxPipe implements PipeTransform { transform(arr: any): number | number[] { return Array.isArray(arr) ? Math.max(...arr) : arr; diff --git a/src/ng-pipes/pipes/math/min.ts b/src/ng-pipes/pipes/math/min.ts index 907ac8cf..bbe52b3f 100644 --- a/src/ng-pipes/pipes/math/min.ts +++ b/src/ng-pipes/pipes/math/min.ts @@ -1,6 +1,9 @@ import { Pipe, PipeTransform } from '@angular/core'; -@Pipe({ name: 'min' }) +@Pipe({ + name: 'min', + standalone: true, +}) export class MinPipe implements PipeTransform { transform(arr: any): number | number[] { return Array.isArray(arr) ? Math.min(...arr) : arr; diff --git a/src/ng-pipes/pipes/math/percentage.ts b/src/ng-pipes/pipes/math/percentage.ts index 35fab989..65761447 100644 --- a/src/ng-pipes/pipes/math/percentage.ts +++ b/src/ng-pipes/pipes/math/percentage.ts @@ -1,6 +1,9 @@ import { Pipe, PipeTransform } from '@angular/core'; -@Pipe({ name: 'percentage' }) +@Pipe({ + name: 'percentage', + standalone: true, +}) export class PercentagePipe implements PipeTransform { transform(num: number, total?: number, floor?: boolean): number; transform(num: T, total?: number, floor?: boolean): T; diff --git a/src/ng-pipes/pipes/math/pow.ts b/src/ng-pipes/pipes/math/pow.ts index be8927cb..abf1fd96 100644 --- a/src/ng-pipes/pipes/math/pow.ts +++ b/src/ng-pipes/pipes/math/pow.ts @@ -1,6 +1,9 @@ import { Pipe, PipeTransform } from '@angular/core'; -@Pipe({ name: 'pow' }) +@Pipe({ + name: 'pow', + standalone: true, +}) export class PowerPipe implements PipeTransform { transform(num: number, power?: number): number; transform(num: any, power?: number): any; diff --git a/src/ng-pipes/pipes/math/radians.ts b/src/ng-pipes/pipes/math/radians.ts index 7d7bd631..d07ce8e2 100644 --- a/src/ng-pipes/pipes/math/radians.ts +++ b/src/ng-pipes/pipes/math/radians.ts @@ -1,7 +1,10 @@ import { Pipe, PipeTransform } from '@angular/core'; import { isNumberFinite } from '../helpers/helpers'; -@Pipe({ name: 'radians' }) +@Pipe({ + name: 'radians', + standalone: true, +}) export class RadiansPipe implements PipeTransform { transform(degrees: number): number { if (!isNumberFinite(degrees)) { diff --git a/src/ng-pipes/pipes/math/round.ts b/src/ng-pipes/pipes/math/round.ts index 5970d426..6f8ba8f8 100644 --- a/src/ng-pipes/pipes/math/round.ts +++ b/src/ng-pipes/pipes/math/round.ts @@ -1,7 +1,10 @@ import { Pipe, PipeTransform } from '@angular/core'; import { applyPrecision } from '../helpers/helpers'; -@Pipe({ name: 'round' }) +@Pipe({ + name: 'round', + standalone: true, +}) export class RoundPipe implements PipeTransform { transform(num: number, precision: number = 0): number { return applyPrecision(num, precision); diff --git a/src/ng-pipes/pipes/math/sqrt.ts b/src/ng-pipes/pipes/math/sqrt.ts index 113f7353..1dabe204 100644 --- a/src/ng-pipes/pipes/math/sqrt.ts +++ b/src/ng-pipes/pipes/math/sqrt.ts @@ -1,6 +1,9 @@ import { Pipe, PipeTransform } from '@angular/core'; -@Pipe({ name: 'sqrt' }) +@Pipe({ + name: 'sqrt', + standalone: true, +}) export class SqrtPipe implements PipeTransform { transform(num: number): number; transform(num: T): T; diff --git a/src/ng-pipes/pipes/math/sum.ts b/src/ng-pipes/pipes/math/sum.ts index d231e603..21a3a804 100644 --- a/src/ng-pipes/pipes/math/sum.ts +++ b/src/ng-pipes/pipes/math/sum.ts @@ -1,6 +1,9 @@ import { Pipe, PipeTransform } from '@angular/core'; -@Pipe({ name: 'sum' }) +@Pipe({ + name: 'sum', + standalone: true, +}) export class SumPipe implements PipeTransform { transform(num: any[]): number; transform(num: any): T; diff --git a/src/ng-pipes/pipes/object/diff-obj.ts b/src/ng-pipes/pipes/object/diff-obj.ts index fdbbb4c5..81284aaa 100644 --- a/src/ng-pipes/pipes/object/diff-obj.ts +++ b/src/ng-pipes/pipes/object/diff-obj.ts @@ -1,7 +1,10 @@ import { Pipe, PipeTransform } from '@angular/core'; import { getKeysTwoObjects, isDeepEqual, isObject } from '../helpers/helpers'; -@Pipe({ name: 'diffObj' }) +@Pipe({ + name: 'diffObj', + standalone: true, +}) export class DiffObjPipe implements PipeTransform { transform(obj: any, original: any = {}): any { if (Array.isArray(obj) || Array.isArray(original) || !isObject(obj) || !isObject(original)) { diff --git a/src/ng-pipes/pipes/object/index.ts b/src/ng-pipes/pipes/object/index.ts index ec28d334..562e2932 100644 --- a/src/ng-pipes/pipes/object/index.ts +++ b/src/ng-pipes/pipes/object/index.ts @@ -11,8 +11,7 @@ import { NgModule } from '@angular/core'; const OBJECT_PIPES = [KeysPipe, ValuesPipe, PairsPipe, PickPipe, InvertPipe, InvertByPipe, OmitPipe, DiffObjPipe]; @NgModule({ - declarations: OBJECT_PIPES, - imports: [], + imports: [...OBJECT_PIPES], exports: OBJECT_PIPES, }) export class NgObjectPipesModule {} diff --git a/src/ng-pipes/pipes/object/invert-by.ts b/src/ng-pipes/pipes/object/invert-by.ts index 3adada95..79a823a8 100644 --- a/src/ng-pipes/pipes/object/invert-by.ts +++ b/src/ng-pipes/pipes/object/invert-by.ts @@ -1,7 +1,10 @@ import { Pipe, PipeTransform } from '@angular/core'; import { isObject } from '../helpers/helpers'; -@Pipe({ name: 'invertBy' }) +@Pipe({ + name: 'invertBy', + standalone: true, +}) export class InvertByPipe implements PipeTransform { transform(obj: any, cb?: Function): Object { if (Array.isArray(obj) || !isObject(obj)) { diff --git a/src/ng-pipes/pipes/object/invert.ts b/src/ng-pipes/pipes/object/invert.ts index b0e3a9f3..8e6c7a5d 100644 --- a/src/ng-pipes/pipes/object/invert.ts +++ b/src/ng-pipes/pipes/object/invert.ts @@ -1,7 +1,10 @@ import { Pipe, PipeTransform } from '@angular/core'; import { isObject } from '../helpers/helpers'; -@Pipe({ name: 'invert' }) +@Pipe({ + name: 'invert', + standalone: true, +}) export class InvertPipe implements PipeTransform { transform(obj: any): Object { if (Array.isArray(obj) || !isObject(obj)) { diff --git a/src/ng-pipes/pipes/object/keys.ts b/src/ng-pipes/pipes/object/keys.ts index 0b6f2d6a..91f9b7f5 100644 --- a/src/ng-pipes/pipes/object/keys.ts +++ b/src/ng-pipes/pipes/object/keys.ts @@ -1,7 +1,10 @@ import { Pipe, PipeTransform } from '@angular/core'; import { isObject } from '../helpers/helpers'; -@Pipe({ name: 'keys' }) +@Pipe({ + name: 'keys', + standalone: true, +}) export class KeysPipe implements PipeTransform { transform(obj: any): any[] { if (Array.isArray(obj) || !isObject(obj)) { diff --git a/src/ng-pipes/pipes/object/omit.ts b/src/ng-pipes/pipes/object/omit.ts index 3513de10..44854a4c 100644 --- a/src/ng-pipes/pipes/object/omit.ts +++ b/src/ng-pipes/pipes/object/omit.ts @@ -1,7 +1,10 @@ import { Pipe, PipeTransform } from '@angular/core'; import { isObject } from '../helpers/helpers'; -@Pipe({ name: 'omit' }) +@Pipe({ + name: 'omit', + standalone: true, +}) export class OmitPipe implements PipeTransform { transform(obj: any, ...args: Array): Object { if (Array.isArray(obj) || !isObject(obj)) { @@ -11,7 +14,7 @@ export class OmitPipe implements PipeTransform { return ( Object.keys(obj) // tslint:disable-next-line:no-bitwise - .filter(k => !~args.indexOf(k)) + .filter((k) => !~args.indexOf(k)) .reduce((o, k) => { return Object.assign(o, { [k]: obj[k] }); }, {}) diff --git a/src/ng-pipes/pipes/object/pairs.spec.ts b/src/ng-pipes/pipes/object/pairs.spec.ts index e44b4f55..b9362501 100644 --- a/src/ng-pipes/pipes/object/pairs.spec.ts +++ b/src/ng-pipes/pipes/object/pairs.spec.ts @@ -18,7 +18,13 @@ describe('PairsPipe', () => { it('should return array of pairs', () => { expect(pipe.transform({})).toEqual([]); expect(pipe.transform({ foo: 'bar' })).toEqual([['foo', 'bar']]); - expect(pipe.transform({ foo: 1, bar: 42 })).toEqual([['foo', 1], ['bar', 42]]); - expect(pipe.transform({ foo: [1, 2], bar: { a: 2 } })).toEqual([['foo', [1, 2]], ['bar', { a: 2 }]]); + expect(pipe.transform({ foo: 1, bar: 42 })).toEqual([ + ['foo', 1], + ['bar', 42], + ]); + expect(pipe.transform({ foo: [1, 2], bar: { a: 2 } })).toEqual([ + ['foo', [1, 2]], + ['bar', { a: 2 }], + ]); }); }); diff --git a/src/ng-pipes/pipes/object/pairs.ts b/src/ng-pipes/pipes/object/pairs.ts index 74b98628..c0e161b6 100644 --- a/src/ng-pipes/pipes/object/pairs.ts +++ b/src/ng-pipes/pipes/object/pairs.ts @@ -1,7 +1,10 @@ import { Pipe, PipeTransform } from '@angular/core'; import { isObject } from '../helpers/helpers'; -@Pipe({ name: 'pairs' }) +@Pipe({ + name: 'pairs', + standalone: true, +}) export class PairsPipe implements PipeTransform { transform(obj: any): any[] { if (Array.isArray(obj) || !isObject(obj)) { diff --git a/src/ng-pipes/pipes/object/pick.ts b/src/ng-pipes/pipes/object/pick.ts index ee4ac906..ddee09f6 100644 --- a/src/ng-pipes/pipes/object/pick.ts +++ b/src/ng-pipes/pipes/object/pick.ts @@ -1,7 +1,10 @@ import { Pipe, PipeTransform } from '@angular/core'; import { isObject } from '../helpers/helpers'; -@Pipe({ name: 'pick' }) +@Pipe({ + name: 'pick', + standalone: true, +}) export class PickPipe implements PipeTransform { transform(obj: any, ...args: Array): Object { if (Array.isArray(obj) || !isObject(obj)) { diff --git a/src/ng-pipes/pipes/object/values.ts b/src/ng-pipes/pipes/object/values.ts index 873b5d8d..34f0e86a 100644 --- a/src/ng-pipes/pipes/object/values.ts +++ b/src/ng-pipes/pipes/object/values.ts @@ -1,13 +1,16 @@ import { Pipe, PipeTransform } from '@angular/core'; import { isObject } from '../helpers/helpers'; -@Pipe({ name: 'values' }) +@Pipe({ + name: 'values', + standalone: true, +}) export class ValuesPipe implements PipeTransform { transform(obj: any): any[] { if (Array.isArray(obj) || !isObject(obj)) { return obj; } - return Object.keys(obj).map(k => obj[k]); + return Object.keys(obj).map((k) => obj[k]); } } diff --git a/src/ng-pipes/pipes/string/a-or-an.ts b/src/ng-pipes/pipes/string/a-or-an.ts index f1974d84..adc7f399 100644 --- a/src/ng-pipes/pipes/string/a-or-an.ts +++ b/src/ng-pipes/pipes/string/a-or-an.ts @@ -3,6 +3,7 @@ import { isVowel } from '../helpers/helpers'; @Pipe({ name: 'aOrAn', + standalone: true, }) /** * Takes a string and returns the string prepended by 'a' or 'an'. diff --git a/src/ng-pipes/pipes/string/camelize.ts b/src/ng-pipes/pipes/string/camelize.ts index 129d756d..76b25de1 100644 --- a/src/ng-pipes/pipes/string/camelize.ts +++ b/src/ng-pipes/pipes/string/camelize.ts @@ -1,7 +1,10 @@ import { Pipe, PipeTransform } from '@angular/core'; import { isString } from '../helpers/helpers'; -@Pipe({ name: 'camelize' }) +@Pipe({ + name: 'camelize', + standalone: true, +}) export class CamelizePipe implements PipeTransform { transform(input: string, chars?: string): string; transform(input: any, chars?: string): any; diff --git a/src/ng-pipes/pipes/string/index.ts b/src/ng-pipes/pipes/string/index.ts index 4acef31e..ef821bb1 100644 --- a/src/ng-pipes/pipes/string/index.ts +++ b/src/ng-pipes/pipes/string/index.ts @@ -46,8 +46,7 @@ export const STRING_PIPES = [ ]; @NgModule({ - declarations: STRING_PIPES, - imports: [], + imports: [...STRING_PIPES], exports: STRING_PIPES, }) export class NgStringPipesModule {} diff --git a/src/ng-pipes/pipes/string/latinise.ts b/src/ng-pipes/pipes/string/latinise.ts index d7264566..3eca2412 100644 --- a/src/ng-pipes/pipes/string/latinise.ts +++ b/src/ng-pipes/pipes/string/latinise.ts @@ -1,837 +1,840 @@ import { Pipe, PipeTransform } from '@angular/core'; import { isString } from '../helpers/helpers'; -@Pipe({ name: 'latinise' }) +@Pipe({ + name: 'latinise', + standalone: true, +}) export class LatinisePipe implements PipeTransform { // Source: http://semplicewebsites.com/removing-accents-javascript // tslint:disable-next-line whitespace max-line-length object-literal-key-quotes private latinMap: any = { - 'Á': 'A', - 'Ă': 'A', - 'Ắ': 'A', - 'Ặ': 'A', - 'Ằ': 'A', - 'Ẳ': 'A', - 'Ẵ': 'A', - 'Ǎ': 'A', - 'Â': 'A', - 'Ấ': 'A', - 'Ậ': 'A', - 'Ầ': 'A', - 'Ẩ': 'A', - 'Ẫ': 'A', - 'Ä': 'A', - 'Ǟ': 'A', - 'Ȧ': 'A', - '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'Œ': 'OE', - 'ᴀ': 'A', - 'ᴁ': 'AE', - 'ʙ': 'B', - 'ᴃ': 'B', - 'ᴄ': 'C', - 'ᴅ': 'D', - 'ᴇ': 'E', - 'ꜰ': 'F', - 'ɢ': 'G', - 'ʛ': 'G', - 'ʜ': 'H', - 'ɪ': 'I', - 'ʁ': 'R', - 'ᴊ': 'J', - 'ᴋ': 'K', - 'ʟ': 'L', - 'ᴌ': 'L', - 'ᴍ': 'M', - 'ɴ': 'N', - 'ᴏ': 'O', - 'ɶ': 'OE', - 'ᴐ': 'O', - 'ᴕ': 'OU', - 'ᴘ': 'P', - 'ʀ': 'R', - 'ᴎ': 'N', - 'ᴙ': 'R', - 'ꜱ': 'S', - 'ᴛ': 'T', - 'ⱻ': 'E', - 'ᴚ': 'R', - 'ᴜ': 'U', - 'ᴠ': 'V', - 'ᴡ': 'W', - 'ʏ': 'Y', - 'ᴢ': 'Z', - 'á': 'a', - 'ă': 'a', - 'ắ': 'a', - 'ặ': 'a', - 'ằ': 'a', - 'ẳ': 'a', - 'ẵ': 'a', - 'ǎ': 'a', - 'â': 'a', - 'ấ': 'a', - 'ậ': 'a', - 'ầ': 'a', - 'ẩ': 'a', - 'ẫ': 'a', - 'ä': 'a', - 'ǟ': 'a', - 'ȧ': 'a', - 'ǡ': 'a', - 'ạ': 'a', - 'ȁ': 'a', - 'à': 'a', - 'ả': 'a', - 'ȃ': 'a', - 'ā': 'a', - 'ą': 'a', - 'ᶏ': 'a', - 'ẚ': 'a', - 'å': 'a', - 'ǻ': 'a', - 'ḁ': 'a', - 'ⱥ': 'a', - 'ã': 'a', - 'ꜳ': 'aa', - 'æ': 'ae', - 'ǽ': 'ae', - 'ǣ': 'ae', - 'ꜵ': 'ao', - 'ꜷ': 'au', - 'ꜹ': 'av', - 'ꜻ': 'av', - 'ꜽ': 'ay', - 'ḃ': 'b', - 'ḅ': 'b', - 'ɓ': 'b', - 'ḇ': 'b', - 'ᵬ': 'b', - 'ᶀ': 'b', - 'ƀ': 'b', - 'ƃ': 'b', - 'ɵ': 'o', - 'ć': 'c', - 'č': 'c', - 'ç': 'c', - 'ḉ': 'c', - 'ĉ': 'c', - 'ɕ': 'c', - 'ċ': 'c', - 'ƈ': 'c', - 'ȼ': 'c', - 'ď': 'd', - 'ḑ': 'd', - 'ḓ': 'd', - 'ȡ': 'd', - 'ḋ': 'd', - 'ḍ': 'd', - 'ɗ': 'd', - 'ᶑ': 'd', - 'ḏ': 'd', - 'ᵭ': 'd', - 'ᶁ': 'd', - 'đ': 'd', - 'ɖ': 'd', - 'ƌ': 'd', - 'ı': 'i', - 'ȷ': 'j', - 'ɟ': 'j', - 'ʄ': 'j', - 'dz': 'dz', - 'dž': 'dz', - 'é': 'e', - 'ĕ': 'e', - 'ě': 'e', - 'ȩ': 'e', - 'ḝ': 'e', - 'ê': 'e', - 'ế': 'e', - 'ệ': 'e', - 'ề': 'e', - 'ể': 'e', - 'ễ': 'e', - 'ḙ': 'e', - 'ë': 'e', - 'ė': 'e', - 'ẹ': 'e', - 'ȅ': 'e', - 'è': 'e', - 'ẻ': 'e', - 'ȇ': 'e', - 'ē': 'e', - 'ḗ': 'e', - 'ḕ': 'e', - 'ⱸ': 'e', - 'ę': 'e', - 'ᶒ': 'e', - 'ɇ': 'e', - 'ẽ': 'e', - 'ḛ': 'e', - 'ꝫ': 'et', - 'ḟ': 'f', - 'ƒ': 'f', - 'ᵮ': 'f', - 'ᶂ': 'f', - 'ǵ': 'g', - 'ğ': 'g', - 'ǧ': 'g', - 'ģ': 'g', - 'ĝ': 'g', - 'ġ': 'g', - 'ɠ': 'g', - 'ḡ': 'g', - 'ᶃ': 'g', - 'ǥ': 'g', - 'ḫ': 'h', - 'ȟ': 'h', - 'ḩ': 'h', - 'ĥ': 'h', - 'ⱨ': 'h', - 'ḧ': 'h', - 'ḣ': 'h', - 'ḥ': 'h', - 'ɦ': 'h', - 'ẖ': 'h', - 'ħ': 'h', - 'ƕ': 'hv', - 'í': 'i', - 'ĭ': 'i', - 'ǐ': 'i', - 'î': 'i', - 'ï': 'i', - 'ḯ': 'i', - 'ị': 'i', - 'ȉ': 'i', - 'ì': 'i', - 'ỉ': 'i', - 'ȋ': 'i', - 'ī': 'i', - 'į': 'i', - 'ᶖ': 'i', - 'ɨ': 'i', - 'ĩ': 'i', - 'ḭ': 'i', - 'ꝺ': 'd', - 'ꝼ': 'f', - 'ᵹ': 'g', - 'ꞃ': 'r', - 'ꞅ': 's', - 'ꞇ': 't', - 'ꝭ': 'is', - 'ǰ': 'j', - 'ĵ': 'j', - 'ʝ': 'j', - 'ɉ': 'j', - 'ḱ': 'k', - 'ǩ': 'k', - 'ķ': 'k', - 'ⱪ': 'k', - 'ꝃ': 'k', - 'ḳ': 'k', - 'ƙ': 'k', - 'ḵ': 'k', - 'ᶄ': 'k', - 'ꝁ': 'k', - 'ꝅ': 'k', - 'ĺ': 'l', - 'ƚ': 'l', - 'ɬ': 'l', - 'ľ': 'l', - 'ļ': 'l', - 'ḽ': 'l', - 'ȴ': 'l', - 'ḷ': 'l', - 'ḹ': 'l', - 'ⱡ': 'l', - 'ꝉ': 'l', - 'ḻ': 'l', - 'ŀ': 'l', - 'ɫ': 'l', - 'ᶅ': 'l', - 'ɭ': 'l', - 'ł': 'l', - 'lj': 'lj', - 'ſ': 's', - 'ẜ': 's', - 'ẛ': 's', - 'ẝ': 's', - 'ḿ': 'm', - 'ṁ': 'm', - 'ṃ': 'm', - 'ɱ': 'm', - 'ᵯ': 'm', - 'ᶆ': 'm', - 'ń': 'n', - 'ň': 'n', - 'ņ': 'n', - 'ṋ': 'n', - 'ȵ': 'n', - 'ṅ': 'n', - 'ṇ': 'n', - 'ǹ': 'n', - 'ɲ': 'n', - 'ṉ': 'n', - 'ƞ': 'n', - 'ᵰ': 'n', - 'ᶇ': 'n', - 'ɳ': 'n', - 'ñ': 'n', - 'nj': 'nj', - 'ó': 'o', - 'ŏ': 'o', - 'ǒ': 'o', - 'ô': 'o', - 'ố': 'o', - 'ộ': 'o', - 'ồ': 'o', - 'ổ': 'o', - 'ỗ': 'o', - 'ö': 'o', - 'ȫ': 'o', - 'ȯ': 'o', - 'ȱ': 'o', - 'ọ': 'o', - 'ő': 'o', - 'ȍ': 'o', - 'ò': 'o', - 'ỏ': 'o', - 'ơ': 'o', - 'ớ': 'o', - 'ợ': 'o', - 'ờ': 'o', - 'ở': 'o', - 'ỡ': 'o', - 'ȏ': 'o', - 'ꝋ': 'o', - 'ꝍ': 'o', - 'ⱺ': 'o', - 'ō': 'o', - 'ṓ': 'o', - 'ṑ': 'o', - 'ǫ': 'o', - 'ǭ': 'o', - 'ø': 'o', - 'ǿ': 'o', - 'õ': 'o', - 'ṍ': 'o', - 'ṏ': 'o', - 'ȭ': 'o', - 'ƣ': 'oi', - 'ꝏ': 'oo', - 'ɛ': 'e', - 'ᶓ': 'e', - 'ɔ': 'o', - 'ᶗ': 'o', - 'ȣ': 'ou', - 'ṕ': 'p', - 'ṗ': 'p', - 'ꝓ': 'p', - 'ƥ': 'p', - 'ᵱ': 'p', - 'ᶈ': 'p', - 'ꝕ': 'p', - 'ᵽ': 'p', - 'ꝑ': 'p', - 'ꝙ': 'q', - 'ʠ': 'q', - 'ɋ': 'q', - 'ꝗ': 'q', - 'ŕ': 'r', - 'ř': 'r', - 'ŗ': 'r', - 'ṙ': 'r', - 'ṛ': 'r', - 'ṝ': 'r', - 'ȑ': 'r', - 'ɾ': 'r', - 'ᵳ': 'r', - 'ȓ': 'r', - 'ṟ': 'r', - 'ɼ': 'r', - 'ᵲ': 'r', - 'ᶉ': 'r', - 'ɍ': 'r', - 'ɽ': 'r', - 'ↄ': 'c', - 'ꜿ': 'c', - 'ɘ': 'e', - 'ɿ': 'r', - 'ś': 's', - 'ṥ': 's', - 'š': 's', - 'ṧ': 's', - 'ş': 's', - 'ŝ': 's', - 'ș': 's', - 'ṡ': 's', - 'ṣ': 's', - 'ṩ': 's', - 'ʂ': 's', - 'ᵴ': 's', - 'ᶊ': 's', - 'ȿ': 's', - 'ɡ': 'g', - 'ß': 'ss', - 'ᴑ': 'o', - 'ᴓ': 'o', - 'ᴝ': 'u', - 'ť': 't', - 'ţ': 't', - 'ṱ': 't', - 'ț': 't', - 'ȶ': 't', - 'ẗ': 't', - 'ⱦ': 't', - 'ṫ': 't', - 'ṭ': 't', - 'ƭ': 't', - 'ṯ': 't', - 'ᵵ': 't', - 'ƫ': 't', - 'ʈ': 't', - 'ŧ': 't', - 'ᵺ': 'th', - 'ɐ': 'a', - 'ᴂ': 'ae', - 'ǝ': 'e', - 'ᵷ': 'g', - 'ɥ': 'h', - 'ʮ': 'h', - 'ʯ': 'h', - 'ᴉ': 'i', - 'ʞ': 'k', - 'ꞁ': 'l', - 'ɯ': 'm', - 'ɰ': 'm', - 'ᴔ': 'oe', - 'ɹ': 'r', - 'ɻ': 'r', - 'ɺ': 'r', - 'ⱹ': 'r', - 'ʇ': 't', - 'ʌ': 'v', - 'ʍ': 'w', - 'ʎ': 'y', - 'ꜩ': 'tz', - 'ú': 'u', - 'ŭ': 'u', - 'ǔ': 'u', - 'û': 'u', - 'ṷ': 'u', - 'ü': 'u', - 'ǘ': 'u', - 'ǚ': 'u', - 'ǜ': 'u', - 'ǖ': 'u', - 'ṳ': 'u', - 'ụ': 'u', - 'ű': 'u', - 'ȕ': 'u', - 'ù': 'u', - 'ủ': 'u', - 'ư': 'u', - 'ứ': 'u', - 'ự': 'u', - 'ừ': 'u', - 'ử': 'u', - 'ữ': 'u', - 'ȗ': 'u', - 'ū': 'u', - 'ṻ': 'u', - 'ų': 'u', - 'ᶙ': 'u', - 'ů': 'u', - 'ũ': 'u', - 'ṹ': 'u', - 'ṵ': 'u', - 'ᵫ': 'ue', - 'ꝸ': 'um', - 'ⱴ': 'v', - 'ꝟ': 'v', - 'ṿ': 'v', - 'ʋ': 'v', - 'ᶌ': 'v', - 'ⱱ': 'v', - 'ṽ': 'v', - 'ꝡ': 'vy', - 'ẃ': 'w', - 'ŵ': 'w', - 'ẅ': 'w', - 'ẇ': 'w', - 'ẉ': 'w', - 'ẁ': 'w', - 'ⱳ': 'w', - 'ẘ': 'w', - 'ẍ': 'x', - 'ẋ': 'x', - 'ᶍ': 'x', - 'ý': 'y', - 'ŷ': 'y', - 'ÿ': 'y', - 'ẏ': 'y', - 'ỵ': 'y', - 'ỳ': 'y', - 'ƴ': 'y', - 'ỷ': 'y', - 'ỿ': 'y', - 'ȳ': 'y', - 'ẙ': 'y', - 'ɏ': 'y', - 'ỹ': 'y', - 'ź': 'z', - 'ž': 'z', - 'ẑ': 'z', - 'ʑ': 'z', - 'ⱬ': 'z', - 'ż': 'z', - 'ẓ': 'z', - 'ȥ': 'z', - 'ẕ': 'z', - 'ᵶ': 'z', - 'ᶎ': 'z', - 'ʐ': 'z', - 'ƶ': 'z', - 'ɀ': 'z', - 'ff': 'ff', - 'ffi': 'ffi', - 'ffl': 'ffl', - 'fi': 'fi', - 'fl': 'fl', - 'ij': 'ij', - 'œ': 'oe', - 'st': 'st', - 'ₐ': 'a', - 'ₑ': 'e', - 'ᵢ': 'i', - 'ⱼ': 'j', - 'ₒ': 'o', - 'ᵣ': 'r', - 'ᵤ': 'u', - 'ᵥ': 'v', - 'ₓ': 'x', + Á: 'A', + Ă: 'A', + Ắ: 'A', + Ặ: 'A', + Ằ: 'A', + Ẳ: 'A', + Ẵ: 'A', + Ǎ: 'A', + Â: 'A', + Ấ: 'A', + Ậ: 'A', + Ầ: 'A', + Ẩ: 'A', + Ẫ: 'A', + Ä: 'A', + Ǟ: 'A', + Ȧ: 'A', + Ǡ: 'A', + Ạ: 'A', + Ȁ: 'A', + À: 'A', + Ả: 'A', + Ȃ: 'A', + Ā: 'A', + Ą: 'A', + Å: 'A', + Ǻ: 'A', + Ḁ: 'A', + Ⱥ: 'A', + Ã: 'A', + Ꜳ: 'AA', + Æ: 'AE', + Ǽ: 'AE', + Ǣ: 'AE', + Ꜵ: 'AO', + Ꜷ: 'AU', + Ꜹ: 'AV', + Ꜻ: 'AV', + Ꜽ: 'AY', +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+ Ɏ: 'Y', + Ỹ: 'Y', + Ź: 'Z', + Ž: 'Z', + Ẑ: 'Z', + Ⱬ: 'Z', + Ż: 'Z', + Ẓ: 'Z', + Ȥ: 'Z', + Ẕ: 'Z', + Ƶ: 'Z', + IJ: 'IJ', + Œ: 'OE', + ᴀ: 'A', + ᴁ: 'AE', + ʙ: 'B', + ᴃ: 'B', + ᴄ: 'C', + ᴅ: 'D', + ᴇ: 'E', + ꜰ: 'F', + ɢ: 'G', + ʛ: 'G', + ʜ: 'H', + ɪ: 'I', + ʁ: 'R', + ᴊ: 'J', + ᴋ: 'K', + ʟ: 'L', + ᴌ: 'L', + ᴍ: 'M', + ɴ: 'N', + ᴏ: 'O', + ɶ: 'OE', + ᴐ: 'O', + ᴕ: 'OU', + ᴘ: 'P', + ʀ: 'R', + ᴎ: 'N', + ᴙ: 'R', + ꜱ: 'S', + ᴛ: 'T', + ⱻ: 'E', + ᴚ: 'R', + ᴜ: 'U', + ᴠ: 'V', + ᴡ: 'W', + ʏ: 'Y', + ᴢ: 'Z', + á: 'a', + ă: 'a', + ắ: 'a', + ặ: 'a', + ằ: 'a', + ẳ: 'a', + ẵ: 'a', + ǎ: 'a', + â: 'a', + ấ: 'a', + ậ: 'a', + ầ: 'a', + ẩ: 'a', + ẫ: 'a', + ä: 'a', + ǟ: 'a', + ȧ: 'a', + ǡ: 'a', + ạ: 'a', + ȁ: 'a', + à: 'a', + ả: 'a', + ȃ: 'a', + ā: 'a', + ą: 'a', + ᶏ: 'a', + ẚ: 'a', + å: 'a', + ǻ: 'a', + ḁ: 'a', + ⱥ: 'a', + ã: 'a', + ꜳ: 'aa', + æ: 'ae', + ǽ: 'ae', + ǣ: 'ae', + ꜵ: 'ao', + ꜷ: 'au', + ꜹ: 'av', + ꜻ: 'av', + ꜽ: 'ay', + ḃ: 'b', + ḅ: 'b', + ɓ: 'b', + ḇ: 'b', + ᵬ: 'b', + ᶀ: 'b', + ƀ: 'b', + ƃ: 'b', + ɵ: 'o', + ć: 'c', + č: 'c', + ç: 'c', + ḉ: 'c', + ĉ: 'c', + ɕ: 'c', + ċ: 'c', + ƈ: 'c', + ȼ: 'c', + ď: 'd', + ḑ: 'd', + ḓ: 'd', + ȡ: 'd', + ḋ: 'd', + ḍ: 'd', + ɗ: 'd', + ᶑ: 'd', + ḏ: 'd', + ᵭ: 'd', + ᶁ: 'd', + đ: 'd', + ɖ: 'd', + ƌ: 'd', + ı: 'i', + ȷ: 'j', + ɟ: 'j', + ʄ: 'j', + dz: 'dz', + dž: 'dz', + é: 'e', + ĕ: 'e', + ě: 'e', + ȩ: 'e', + ḝ: 'e', + ê: 'e', + ế: 'e', + ệ: 'e', + ề: 'e', + ể: 'e', + ễ: 'e', + ḙ: 'e', + ë: 'e', + ė: 'e', + ẹ: 'e', + ȅ: 'e', + è: 'e', + ẻ: 'e', + ȇ: 'e', + ē: 'e', + ḗ: 'e', + ḕ: 'e', + ⱸ: 'e', + ę: 'e', + ᶒ: 'e', + ɇ: 'e', + ẽ: 'e', + ḛ: 'e', + ꝫ: 'et', + ḟ: 'f', + ƒ: 'f', + ᵮ: 'f', + ᶂ: 'f', + ǵ: 'g', + ğ: 'g', + ǧ: 'g', + ģ: 'g', + ĝ: 'g', + ġ: 'g', + ɠ: 'g', + ḡ: 'g', + ᶃ: 'g', + ǥ: 'g', + ḫ: 'h', + ȟ: 'h', + ḩ: 'h', + ĥ: 'h', + ⱨ: 'h', + ḧ: 'h', + ḣ: 'h', + ḥ: 'h', + ɦ: 'h', + ẖ: 'h', + ħ: 'h', + ƕ: 'hv', + í: 'i', + ĭ: 'i', + ǐ: 'i', + î: 'i', + ï: 'i', + ḯ: 'i', + ị: 'i', + ȉ: 'i', + ì: 'i', + ỉ: 'i', + ȋ: 'i', + ī: 'i', + į: 'i', + ᶖ: 'i', + ɨ: 'i', + ĩ: 'i', + ḭ: 'i', + ꝺ: 'd', + ꝼ: 'f', + ᵹ: 'g', + ꞃ: 'r', + ꞅ: 's', + ꞇ: 't', + ꝭ: 'is', + ǰ: 'j', + ĵ: 'j', + ʝ: 'j', + ɉ: 'j', + ḱ: 'k', + ǩ: 'k', + ķ: 'k', + ⱪ: 'k', + ꝃ: 'k', + ḳ: 'k', + ƙ: 'k', + ḵ: 'k', + ᶄ: 'k', + ꝁ: 'k', + ꝅ: 'k', + ĺ: 'l', + ƚ: 'l', + ɬ: 'l', + ľ: 'l', + ļ: 'l', + ḽ: 'l', + ȴ: 'l', + ḷ: 'l', + ḹ: 'l', + ⱡ: 'l', + ꝉ: 'l', + ḻ: 'l', + ŀ: 'l', + ɫ: 'l', + ᶅ: 'l', + ɭ: 'l', + ł: 'l', + lj: 'lj', + ſ: 's', + ẜ: 's', + ẛ: 's', + ẝ: 's', + ḿ: 'm', + ṁ: 'm', + ṃ: 'm', + ɱ: 'm', + ᵯ: 'm', + ᶆ: 'm', + ń: 'n', + ň: 'n', + ņ: 'n', + ṋ: 'n', + ȵ: 'n', + ṅ: 'n', + ṇ: 'n', + ǹ: 'n', + ɲ: 'n', + ṉ: 'n', + ƞ: 'n', + ᵰ: 'n', + ᶇ: 'n', + ɳ: 'n', + ñ: 'n', + nj: 'nj', + ó: 'o', + ŏ: 'o', + ǒ: 'o', + ô: 'o', + ố: 'o', + ộ: 'o', + ồ: 'o', + ổ: 'o', + ỗ: 'o', + ö: 'o', + ȫ: 'o', + ȯ: 'o', + ȱ: 'o', + ọ: 'o', + ő: 'o', + ȍ: 'o', + ò: 'o', + ỏ: 'o', + ơ: 'o', + ớ: 'o', + ợ: 'o', + ờ: 'o', + ở: 'o', + ỡ: 'o', + ȏ: 'o', + ꝋ: 'o', + ꝍ: 'o', + ⱺ: 'o', + ō: 'o', + ṓ: 'o', + ṑ: 'o', + ǫ: 'o', + ǭ: 'o', + ø: 'o', + ǿ: 'o', + õ: 'o', + ṍ: 'o', + ṏ: 'o', + ȭ: 'o', + ƣ: 'oi', + ꝏ: 'oo', + ɛ: 'e', + ᶓ: 'e', + ɔ: 'o', + ᶗ: 'o', + ȣ: 'ou', + ṕ: 'p', + ṗ: 'p', + ꝓ: 'p', + ƥ: 'p', + ᵱ: 'p', + ᶈ: 'p', + ꝕ: 'p', + ᵽ: 'p', + ꝑ: 'p', + ꝙ: 'q', + ʠ: 'q', + ɋ: 'q', + ꝗ: 'q', + ŕ: 'r', + ř: 'r', + ŗ: 'r', + ṙ: 'r', + ṛ: 'r', + ṝ: 'r', + ȑ: 'r', + ɾ: 'r', + ᵳ: 'r', + ȓ: 'r', + ṟ: 'r', + ɼ: 'r', + ᵲ: 'r', + ᶉ: 'r', + ɍ: 'r', + ɽ: 'r', + ↄ: 'c', + ꜿ: 'c', + ɘ: 'e', + ɿ: 'r', + ś: 's', + ṥ: 's', + š: 's', + ṧ: 's', + ş: 's', + ŝ: 's', + ș: 's', + ṡ: 's', + ṣ: 's', + ṩ: 's', + ʂ: 's', + ᵴ: 's', + ᶊ: 's', + ȿ: 's', + ɡ: 'g', + ß: 'ss', + ᴑ: 'o', + ᴓ: 'o', + ᴝ: 'u', + ť: 't', + ţ: 't', + ṱ: 't', + ț: 't', + ȶ: 't', + ẗ: 't', + ⱦ: 't', + ṫ: 't', + ṭ: 't', + ƭ: 't', + ṯ: 't', + ᵵ: 't', + ƫ: 't', + ʈ: 't', + ŧ: 't', + ᵺ: 'th', + ɐ: 'a', + ᴂ: 'ae', + ǝ: 'e', + ᵷ: 'g', + ɥ: 'h', + ʮ: 'h', + ʯ: 'h', + ᴉ: 'i', + ʞ: 'k', + ꞁ: 'l', + ɯ: 'm', + ɰ: 'm', + ᴔ: 'oe', + ɹ: 'r', + ɻ: 'r', + ɺ: 'r', + ⱹ: 'r', + ʇ: 't', + ʌ: 'v', + ʍ: 'w', + ʎ: 'y', + ꜩ: 'tz', + ú: 'u', + ŭ: 'u', + ǔ: 'u', + û: 'u', + ṷ: 'u', + ü: 'u', + ǘ: 'u', + ǚ: 'u', + ǜ: 'u', + ǖ: 'u', + ṳ: 'u', + ụ: 'u', + ű: 'u', + ȕ: 'u', + ù: 'u', + ủ: 'u', + ư: 'u', + ứ: 'u', + ự: 'u', + ừ: 'u', + ử: 'u', + ữ: 'u', + ȗ: 'u', + ū: 'u', + ṻ: 'u', + ų: 'u', + ᶙ: 'u', + ů: 'u', + ũ: 'u', + ṹ: 'u', + ṵ: 'u', + ᵫ: 'ue', + ꝸ: 'um', + ⱴ: 'v', + ꝟ: 'v', + ṿ: 'v', + ʋ: 'v', + ᶌ: 'v', + ⱱ: 'v', + ṽ: 'v', + ꝡ: 'vy', + ẃ: 'w', + ŵ: 'w', + ẅ: 'w', + ẇ: 'w', + ẉ: 'w', + ẁ: 'w', + ⱳ: 'w', + ẘ: 'w', + ẍ: 'x', + ẋ: 'x', + ᶍ: 'x', + ý: 'y', + ŷ: 'y', + ÿ: 'y', + ẏ: 'y', + ỵ: 'y', + ỳ: 'y', + ƴ: 'y', + ỷ: 'y', + ỿ: 'y', + ȳ: 'y', + ẙ: 'y', + ɏ: 'y', + ỹ: 'y', + ź: 'z', + ž: 'z', + ẑ: 'z', + ʑ: 'z', + ⱬ: 'z', + ż: 'z', + ẓ: 'z', + ȥ: 'z', + ẕ: 'z', + ᵶ: 'z', + ᶎ: 'z', + ʐ: 'z', + ƶ: 'z', + ɀ: 'z', + ff: 'ff', + ffi: 'ffi', + ffl: 'ffl', + fi: 'fi', + fl: 'fl', + ij: 'ij', + œ: 'oe', + st: 'st', + ₐ: 'a', + ₑ: 'e', + ᵢ: 'i', + ⱼ: 'j', + ₒ: 'o', + ᵣ: 'r', + ᵤ: 'u', + ᵥ: 'v', + ₓ: 'x', }; transform(input: string, chars?: string): string; diff --git a/src/ng-pipes/pipes/string/lines.ts b/src/ng-pipes/pipes/string/lines.ts index b5ea58f8..77222423 100644 --- a/src/ng-pipes/pipes/string/lines.ts +++ b/src/ng-pipes/pipes/string/lines.ts @@ -1,7 +1,10 @@ import { Pipe, PipeTransform } from '@angular/core'; import { isString } from '../helpers/helpers'; -@Pipe({ name: 'lines' }) +@Pipe({ + name: 'lines', + standalone: true, +}) export class LinesPipe implements PipeTransform { transform(text: any, chars: string = '\\s'): Array | any { return isString(text) ? text.replace(/\r\n/g, '\n').split('\n') : text; diff --git a/src/ng-pipes/pipes/string/lpad.ts b/src/ng-pipes/pipes/string/lpad.ts index 1f0ab801..71423fad 100644 --- a/src/ng-pipes/pipes/string/lpad.ts +++ b/src/ng-pipes/pipes/string/lpad.ts @@ -1,7 +1,10 @@ import { Pipe, PipeTransform } from '@angular/core'; import { isString } from '../helpers/helpers'; -@Pipe({ name: 'lpad' }) +@Pipe({ + name: 'lpad', + standalone: true, +}) export class LeftPadPipe implements PipeTransform { transform(str: string, length: number, padCharacter: string = ' '): string { if (!isString(str) || str.length >= length) { diff --git a/src/ng-pipes/pipes/string/ltrim.ts b/src/ng-pipes/pipes/string/ltrim.ts index d1f43454..540b6bf2 100644 --- a/src/ng-pipes/pipes/string/ltrim.ts +++ b/src/ng-pipes/pipes/string/ltrim.ts @@ -1,7 +1,10 @@ import { Pipe, PipeTransform } from '@angular/core'; import { isString } from '../helpers/helpers'; -@Pipe({ name: 'ltrim' }) +@Pipe({ + name: 'ltrim', + standalone: true, +}) export class LeftTrimPipe implements PipeTransform { transform(text: string, chars: string = '\\s'): string { return isString(text) ? text.replace(new RegExp(`^[${chars}]+`), '') : text; diff --git a/src/ng-pipes/pipes/string/match.ts b/src/ng-pipes/pipes/string/match.ts index ab201ec9..39db91b8 100644 --- a/src/ng-pipes/pipes/string/match.ts +++ b/src/ng-pipes/pipes/string/match.ts @@ -1,7 +1,10 @@ import { Pipe, PipeTransform } from '@angular/core'; import { isString } from '../helpers/helpers'; -@Pipe({ name: 'match' }) +@Pipe({ + name: 'match', + standalone: true, +}) export class MatchPipe implements PipeTransform { transform(text: string, pattern: string, flags?: string): RegExpMatchArray | null; transform(text: T, pattern: string, flags?: string): T; diff --git a/src/ng-pipes/pipes/string/pluralize.ts b/src/ng-pipes/pipes/string/pluralize.ts index 47e656b4..6cc94dad 100644 --- a/src/ng-pipes/pipes/string/pluralize.ts +++ b/src/ng-pipes/pipes/string/pluralize.ts @@ -3,6 +3,7 @@ import { isVowel } from '../helpers/helpers'; @Pipe({ name: 'makePluralString', + standalone: true, }) /** diff --git a/src/ng-pipes/pipes/string/repeat.ts b/src/ng-pipes/pipes/string/repeat.ts index 2e14da4e..410b1f19 100644 --- a/src/ng-pipes/pipes/string/repeat.ts +++ b/src/ng-pipes/pipes/string/repeat.ts @@ -1,7 +1,10 @@ import { Pipe, PipeTransform } from '@angular/core'; import { isString } from '../helpers/helpers'; -@Pipe({ name: 'repeat' }) +@Pipe({ + name: 'repeat', + standalone: true, +}) export class RepeatPipe implements PipeTransform { transform(str: string, n: number = 1, separator: string = ''): string { if (n <= 0) { diff --git a/src/ng-pipes/pipes/string/rpad.ts b/src/ng-pipes/pipes/string/rpad.ts index f462e60a..7462fd15 100644 --- a/src/ng-pipes/pipes/string/rpad.ts +++ b/src/ng-pipes/pipes/string/rpad.ts @@ -1,7 +1,10 @@ import { Pipe, PipeTransform } from '@angular/core'; import { isString } from '../helpers/helpers'; -@Pipe({ name: 'rpad' }) +@Pipe({ + name: 'rpad', + standalone: true, +}) export class RightPadPipe implements PipeTransform { transform(str: string, length: number = 1, padCharacter: string = ' '): string { if (!isString(str) || str.length >= length) { diff --git a/src/ng-pipes/pipes/string/rtrim.ts b/src/ng-pipes/pipes/string/rtrim.ts index bcd95384..bafd21cc 100644 --- a/src/ng-pipes/pipes/string/rtrim.ts +++ b/src/ng-pipes/pipes/string/rtrim.ts @@ -1,7 +1,10 @@ import { Pipe, PipeTransform } from '@angular/core'; import { isString } from '../helpers/helpers'; -@Pipe({ name: 'rtrim' }) +@Pipe({ + name: 'rtrim', + standalone: true, +}) export class RightTrimPipe implements PipeTransform { transform(text: string, chars: string = '\\s'): string { return isString(text) ? text.replace(new RegExp(`[${chars}]+$`), '') : text; diff --git a/src/ng-pipes/pipes/string/scan.ts b/src/ng-pipes/pipes/string/scan.ts index 374ccf11..47ddcb61 100644 --- a/src/ng-pipes/pipes/string/scan.ts +++ b/src/ng-pipes/pipes/string/scan.ts @@ -1,7 +1,10 @@ import { Pipe, PipeTransform } from '@angular/core'; import { isString, isUndefined } from '../helpers/helpers'; -@Pipe({ name: 'scan' }) +@Pipe({ + name: 'scan', + standalone: true, +}) export class ScanPipe implements PipeTransform { transform(text: string, args: string[] = []): string { return isString(text) diff --git a/src/ng-pipes/pipes/string/shorten.ts b/src/ng-pipes/pipes/string/shorten.ts index 931aabc5..e403d680 100644 --- a/src/ng-pipes/pipes/string/shorten.ts +++ b/src/ng-pipes/pipes/string/shorten.ts @@ -1,7 +1,10 @@ import { Pipe, PipeTransform } from '@angular/core'; import { isString } from '../helpers/helpers'; -@Pipe({ name: 'shorten' }) +@Pipe({ + name: 'shorten', + standalone: true, +}) export class ShortenPipe implements PipeTransform { transform(input: string, length?: number, suffix?: string, wordBreak?: boolean): string; transform(input: any, length?: number, suffix?: string, wordBreak?: boolean): any; diff --git a/src/ng-pipes/pipes/string/slugify.ts b/src/ng-pipes/pipes/string/slugify.ts index 4e943313..a6109e23 100644 --- a/src/ng-pipes/pipes/string/slugify.ts +++ b/src/ng-pipes/pipes/string/slugify.ts @@ -1,7 +1,10 @@ import { Pipe, PipeTransform } from '@angular/core'; import { isString } from '../helpers/helpers'; -@Pipe({ name: 'slugify' }) +@Pipe({ + name: 'slugify', + standalone: true, +}) export class SlugifyPipe implements PipeTransform { transform(str: string): string { return isString(str) diff --git a/src/ng-pipes/pipes/string/strip-tags.ts b/src/ng-pipes/pipes/string/strip-tags.ts index 46cab172..0fc98166 100644 --- a/src/ng-pipes/pipes/string/strip-tags.ts +++ b/src/ng-pipes/pipes/string/strip-tags.ts @@ -1,6 +1,9 @@ import { Pipe, PipeTransform } from '@angular/core'; -@Pipe({ name: 'stripTags' }) +@Pipe({ + name: 'stripTags', + standalone: true, +}) export class StripTagsPipe implements PipeTransform { transform(text: string, ...allowedTags: any[]): string { return allowedTags.length > 0 diff --git a/src/ng-pipes/pipes/string/test.ts b/src/ng-pipes/pipes/string/test.ts index c2b4d386..2f9f3201 100644 --- a/src/ng-pipes/pipes/string/test.ts +++ b/src/ng-pipes/pipes/string/test.ts @@ -1,7 +1,10 @@ import { Pipe, PipeTransform } from '@angular/core'; import { isString } from '../helpers/helpers'; -@Pipe({ name: 'test' }) +@Pipe({ + name: 'test', + standalone: true, +}) export class TestPipe implements PipeTransform { transform(text: string, pattern: string, flags?: string): boolean; transform(text: T, pattern: string, flags?: string): T; diff --git a/src/ng-pipes/pipes/string/trim.ts b/src/ng-pipes/pipes/string/trim.ts index 84bc4c55..a73ac8c5 100644 --- a/src/ng-pipes/pipes/string/trim.ts +++ b/src/ng-pipes/pipes/string/trim.ts @@ -1,7 +1,10 @@ import { Pipe, PipeTransform } from '@angular/core'; import { isString } from '../helpers/helpers'; -@Pipe({ name: 'trim' }) +@Pipe({ + name: 'trim', + standalone: true, +}) export class TrimPipe implements PipeTransform { transform(text: string, chars: string = '\\s'): string { return isString(text) ? text.replace(new RegExp(`^[${chars}]+|[${chars}]+$`, 'g'), '') : text; diff --git a/src/ng-pipes/pipes/string/ucfirst.ts b/src/ng-pipes/pipes/string/ucfirst.ts index 794c9dcd..01998ded 100644 --- a/src/ng-pipes/pipes/string/ucfirst.ts +++ b/src/ng-pipes/pipes/string/ucfirst.ts @@ -1,7 +1,10 @@ import { Pipe, PipeTransform } from '@angular/core'; import { isString, ucFirst } from '../helpers/helpers'; -@Pipe({ name: 'ucfirst' }) +@Pipe({ + name: 'ucfirst', + standalone: true, +}) export class UcFirstPipe implements PipeTransform { transform(input: string): string; transform(input: any): any; diff --git a/src/ng-pipes/pipes/string/ucwords.ts b/src/ng-pipes/pipes/string/ucwords.ts index 48599f9f..f6f3d915 100644 --- a/src/ng-pipes/pipes/string/ucwords.ts +++ b/src/ng-pipes/pipes/string/ucwords.ts @@ -1,7 +1,10 @@ import { Pipe, PipeTransform } from '@angular/core'; import { isString, ucFirst } from '../helpers/helpers'; -@Pipe({ name: 'ucwords' }) +@Pipe({ + name: 'ucwords', + standalone: true, +}) export class UcWordsPipe implements PipeTransform { transform(input: string): string; transform(input: any): any; diff --git a/src/ng-pipes/pipes/string/underscore.ts b/src/ng-pipes/pipes/string/underscore.ts index e570098c..9b78447e 100644 --- a/src/ng-pipes/pipes/string/underscore.ts +++ b/src/ng-pipes/pipes/string/underscore.ts @@ -1,7 +1,10 @@ import { Pipe, PipeTransform } from '@angular/core'; import { isString } from '../helpers/helpers'; -@Pipe({ name: 'underscore' }) +@Pipe({ + name: 'underscore', + standalone: true, +}) export class UnderscorePipe implements PipeTransform { transform(input: string, chars?: string): string; transform(input: any, chars?: string): any; diff --git a/src/ng-pipes/pipes/string/wrap.ts b/src/ng-pipes/pipes/string/wrap.ts index d6600d9d..b2665fd4 100644 --- a/src/ng-pipes/pipes/string/wrap.ts +++ b/src/ng-pipes/pipes/string/wrap.ts @@ -1,7 +1,10 @@ import { Pipe, PipeTransform } from '@angular/core'; import { isString } from '../helpers/helpers'; -@Pipe({ name: 'wrap' }) +@Pipe({ + name: 'wrap', + standalone: true, +}) export class WrapPipe implements PipeTransform { transform(str: string, prefix: string = '', suffix: string = ''): string { if (!isString(str)) {