Skip to content

Commit

Permalink
feat: add toLowerCase utility function and update README
Browse files Browse the repository at this point in the history
  • Loading branch information
kieranwv committed Jan 4, 2025
1 parent b552d3a commit 877c766
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# @kieranwv/utils

[![Version](https://img.shields.io/github/v/release/kieranwv/utils?style=flat&label=released&color=%2309090b)](https://github.com/kieranwv/utils/releases)
[![Version](https://img.shields.io/npm/v/@kieranwv/utils?style=flat&label=npm&color=09090b)](https://www.npmjs.com/package/@kieranwv/utils)
[![GitHub Release Version](https://img.shields.io/github/v/release/kieranwv/utils?label=Release&color=%42b883)](https://github.com/kieranwv/utils/releases)
[![NPM Version](https://img.shields.io/npm/v/starter-lib-vue3?style=flat&label=npm&color=%42b883)](https://www.npmjs.com/package/starter-lib-vue3)
[![Build Status](https://github.com/kieranwv/utils/actions/workflows/ci.yml/badge.svg?branch=main&color=%42b883)](https://github.com/kieranwv/utils/actions/workflows/ci.yml)

Collection of common JavaScript / TypeScript utils by @kieranwv.

Expand All @@ -19,9 +20,10 @@ const db = new IndexedDB()

## Utils

| name | description |
| -------------------------------- | -------------------------------------- |
| name | description |
| ---------------------------------- | ---------------------------------------- |
| [`IndexedDB`](./src/indexed-db.ts) | The CRUD class for indexedDB in browser. |
| [`toLowerCase`](./src/format.ts) | Converts string characters to lowercase. |

## License

Expand Down
3 changes: 3 additions & 0 deletions src/format.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export function toLowerCase(input: string): string {
return input.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase().replace(/\s+/g, '-')
}
1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export * from './format'
export * from './indexed-db'

0 comments on commit 877c766

Please sign in to comment.