Skip to content

Commit

Permalink
feat(util): add string capitalize
Browse files Browse the repository at this point in the history
  • Loading branch information
alimd committed Jun 6, 2023
1 parent 71e8f27 commit c499456
Showing 3 changed files with 4 additions and 84 deletions.
1 change: 1 addition & 0 deletions core/util/src/index.ts
Original file line number Diff line number Diff line change
@@ -4,3 +4,4 @@ export * from './local-storage.js';
export * from './client-id.js';
export * from './polyfill.js';
export * from './flat-str.js';
export * from './string.js';
3 changes: 3 additions & 0 deletions core/util/src/string.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export const capitalize = <T extends string>(str: T): Capitalize<T> => {
return (str[0].toUpperCase() + str.substring(1).toLowerCase()) as Capitalize<T>;
};
84 changes: 0 additions & 84 deletions demo/finite-state-machine2/light-machine.ts

This file was deleted.

0 comments on commit c499456

Please sign in to comment.