Created
November 1, 2018 01:37
-
-
Save neilbo/389bfd6d6f5b88e2ebe12c2a88c135ec to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Pipe, PipeTransform } from "@angular/core"; | |
import startCase from "lodash/startCase"; | |
@Pipe({ | |
name: "startCase" | |
}) | |
export class StartCasePipe implements PipeTransform { | |
/** | |
* Takes a string such as 'isCamelCase' and makes it 'Is Camel Case'. | |
*/ | |
transform(value: string) { | |
return startCase(value); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment