Skip to content

Commit

Permalink
feat: tolower function
Browse files Browse the repository at this point in the history
  • Loading branch information
Soontao committed Apr 15, 2021
1 parent 8e73359 commit 77735a8
Show file tree
Hide file tree
Showing 5 changed files with 66 additions and 50 deletions.
86 changes: 43 additions & 43 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@
"@babel/core": "^7.13.15",
"@babel/plugin-syntax-typescript": "^7.12.13",
"@types/jest": "^26.0.22",
"@typescript-eslint/eslint-plugin": "^4.21.0",
"@typescript-eslint/parser": "^4.21.0",
"@typescript-eslint/eslint-plugin": "^4.22.0",
"@typescript-eslint/parser": "^4.22.0",
"colors": "^1.4.0",
"eslint": "^7.24.0",
"jest": "^26.6.3",
Expand All @@ -56,7 +56,7 @@
"ts-jest": "^26.5.4",
"ts-loader": "^8.1.0",
"typescript": "^4.2.4",
"webpack": "^5.31.2",
"webpack": "^5.33.2",
"webpack-cli": "^4.6.0"
},
"keywords": [
Expand Down
6 changes: 3 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ import { throttle } from './throttle';
import { createTimeoutPromise, TimeoutError } from './timeout';
import { times } from './times';
import { toArray } from './toArray';
import { toLower } from './toLower';
import { toNumber } from './toNumber';
import { toUpper } from './toUpper';
import { trim } from './trim';
Expand Down Expand Up @@ -204,7 +205,7 @@ export {
retry, concurrency, fallback, logic, isSubClass,
cacheIt, cacheProvider, distance, closest, isInstance,
values, chunk, cacheItTTL, initial, omit, Mutex, Semaphore,
AsyncUtils, isCircular
AsyncUtils, isCircular, toLower
};


Expand Down Expand Up @@ -239,7 +240,6 @@ export default {
retry, concurrency, fallback, logic, isSubClass,
cacheIt, cacheProvider, distance, closest, isInstance,
values, chunk, cacheItTTL, initial, omit, Mutex, Semaphore,
AsyncUtils, isCircular

AsyncUtils, isCircular, toLower
};

16 changes: 16 additions & 0 deletions src/toLower.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { toString } from './toString';

/**
*
* toLower case
*
* @since 5.19.0
* @category String
* @param value The string to convert.
* @returns Returns the lower cased string.
*/
export function toLower(value: string): string {
return toString(value).toLowerCase();
}

export default toLower;
2 changes: 1 addition & 1 deletion test/toLower.js → test/toLower.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as assert from 'assert';
import toLower from '../src/toLower';
import { toLower } from '../src/toLower';

describe('toLower', () => {
it('should convert whole string to lower case', () => {
Expand Down

0 comments on commit 77735a8

Please sign in to comment.