Skip to content

Commit

Permalink
Correct import docs for tree-shaking
Browse files Browse the repository at this point in the history
  • Loading branch information
Will Stone committed Aug 23, 2020
1 parent 54c1a7b commit c564ff7
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ yarn add tings
⚠️ **_Requires Lodash_**

```ts
import { isCamelCase } from 'tings'
import isCamelCase from 'tings/isCamelCase'

isCamelCase('camelCase') // true
isCamelCase('NOTCamelCase') // false
Expand All @@ -42,7 +42,7 @@ isCamelCase('NOTCamelCase') // false
### `isCompactCase`

```ts
import { isCompactCase } from 'tings'
import isCompactCase from 'tings/isCompactCase'

isCompactCase('thisiscompact') // true
isCompactCase('this is not compact') // false
Expand All @@ -51,7 +51,7 @@ isCompactCase('this is not compact') // false
### `isLowerCase`

```ts
import { isLowerCase } from 'tings'
import isLowerCase from 'tings/isLowerCase'

isLowerCase('this is lower') // true
isLowerCase('This is not LOWER') // false
Expand All @@ -62,7 +62,7 @@ isLowerCase('This is not LOWER') // false
⚠️ **_Requires Lodash_**

```ts
import { isPascalCase } from 'tings'
import isPascalCase from 'tings/isPascalCase'

isPascalCase('ThisIsPascal') // true
isPascalCase('notPascal') // false
Expand All @@ -71,7 +71,7 @@ isPascalCase('notPascal') // false
### `isUniq`

```ts
import { isUniq } from 'tings'
import isUniq from 'tings/isUniq'

isUniq([1, 2, 3]) // true
isUniq([1, 1, 2]) // false
Expand All @@ -92,7 +92,7 @@ differences being:
- Symbols are considered _not vacant_.

```ts
import { isVacant } from 'tings'
import isVacant from 'tings/isVacant'

isVacant('') // true
isVacant(0) // true
Expand All @@ -115,7 +115,7 @@ isVacant({ key: 'value' }) // false
Anything that cannot be converted to a number will yield zero.

```ts
import { toNumberAlways } from 'tings'
import toNumberAlways from 'tings/toNumberAlways'

toNumberAlways('this is text') // 0
toNumberAlways('3') // 3
Expand All @@ -126,7 +126,7 @@ toNumberAlways(new Set([])) // 0
### `toOrdinal`

```ts
import { toOrdinal } from 'tings'
import toOrdinal from 'tings/toOrdinal'

toOrdinal('this is text') // 0th
toOrdinal('3') // 3rd
Expand All @@ -138,7 +138,7 @@ toOrdinal('11') // 11th
⚠️ **_Requires Lodash_**

```ts
import { toPascalCase } from 'tings'
import toPascalCase from 'tings/toPascalCase'

toPascalCase('this is text') // ThisIsText
toPascalCase('someTEXT') // SomeText
Expand All @@ -149,7 +149,7 @@ toPascalCase('someTEXT') // SomeText
⚠️ **_Requires Lodash_**

```ts
import { toTitleCase } from 'tings'
import toTitleCase from 'tings/toTitleCase'

toTitleCase('this is text') // This is Text
toTitleCase('smallWordsAreNotCapitalised') // Small Words are not Capitalisedl
Expand Down

0 comments on commit c564ff7

Please sign in to comment.