Skip to content

Instantly share code, notes, and snippets.

@neilbo
Created November 1, 2018 01:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save neilbo/389bfd6d6f5b88e2ebe12c2a88c135ec to your computer and use it in GitHub Desktop.
Save neilbo/389bfd6d6f5b88e2ebe12c2a88c135ec to your computer and use it in GitHub Desktop.
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