aboutsummaryrefslogtreecommitdiffstats
path: root/vid-webpack-master/src/app/shared/pipes/spaceToUnderscore/space-to-underscore.pipe.ts
diff options
context:
space:
mode:
Diffstat (limited to 'vid-webpack-master/src/app/shared/pipes/spaceToUnderscore/space-to-underscore.pipe.ts')
-rw-r--r--vid-webpack-master/src/app/shared/pipes/spaceToUnderscore/space-to-underscore.pipe.ts17
1 files changed, 17 insertions, 0 deletions
diff --git a/vid-webpack-master/src/app/shared/pipes/spaceToUnderscore/space-to-underscore.pipe.ts b/vid-webpack-master/src/app/shared/pipes/spaceToUnderscore/space-to-underscore.pipe.ts
new file mode 100644
index 000000000..b82b28bc1
--- /dev/null
+++ b/vid-webpack-master/src/app/shared/pipes/spaceToUnderscore/space-to-underscore.pipe.ts
@@ -0,0 +1,17 @@
+import { Pipe, PipeTransform } from '@angular/core';
+
+@Pipe({
+ name: 'spaceToUnderscore'
+})
+export class SpaceToUnderscorePipe implements PipeTransform {
+
+ transform(text: string): string {
+ if (text) {
+ // @ts-ignore
+ text = text.replaceAll(' ', '_');
+ return text;
+ }
+ return text;
+ }
+
+}