mirror of
https://github.com/sbrow/strings.git
synced 2025-12-29 23:17:39 -05:00
feat: Added more functions.
This commit is contained in:
@@ -1 +1,7 @@
|
||||
@sbrow/strings / [Exports](modules.md)
|
||||
|
||||
# Strings
|
||||
|
||||
A small, simple, functional, and dependency-free library for JavaScript string manipulation.
|
||||
|
||||
You can view the docs [here](./docs/modules.md)
|
||||
|
||||
172
docs/modules.md
172
docs/modules.md
@@ -6,12 +6,100 @@
|
||||
|
||||
### Functions
|
||||
|
||||
- [afterFirst](modules.md#afterfirst)
|
||||
- [afterLast](modules.md#afterlast)
|
||||
- [endsWith](modules.md#endswith)
|
||||
- [ltrim](modules.md#ltrim)
|
||||
- [rtrim](modules.md#rtrim)
|
||||
- [startsWith](modules.md#startswith)
|
||||
- [trim](modules.md#trim)
|
||||
|
||||
## Functions
|
||||
|
||||
### afterFirst
|
||||
|
||||
▸ **afterFirst**<`P`, `G`, `R`\>(`...p`): `RequiredKeys`<`ObjectOf`<`G`\>\> extends `never` ? `R` : `Curry`<(...`p`: `G`) => `R`\>
|
||||
|
||||
Curry a [[Function]]
|
||||
|
||||
**`Example`**
|
||||
|
||||
```ts
|
||||
import {F} from 'ts-toolbelt'
|
||||
|
||||
/// If you are looking for creating types for `curry`
|
||||
/// It handles placeholders and variable arguments
|
||||
declare function curry<Fn extends F.Function>(fn: Fn): F.Curry<Fn>
|
||||
```
|
||||
|
||||
#### Type parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `P` | extends [separator: string \| typeof \_, str: string \| typeof \_] |
|
||||
| `G` | extends readonly `any`[] = `GapsOf`<`P`, [separator: string, str: string]\> |
|
||||
| `R` | extends `unknown` = `string` |
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `...p` | `P` \| [separator: string \| typeof \_, str: string \| typeof \_] |
|
||||
|
||||
#### Returns
|
||||
|
||||
`RequiredKeys`<`ObjectOf`<`G`\>\> extends `never` ? `R` : `Curry`<(...`p`: `G`) => `R`\>
|
||||
|
||||
[[Function]]
|
||||
|
||||
#### Defined in
|
||||
|
||||
node_modules/ts-toolbelt/out/Function/Curry.d.ts:77
|
||||
|
||||
___
|
||||
|
||||
### afterLast
|
||||
|
||||
▸ **afterLast**<`P`, `G`, `R`\>(`...p`): `RequiredKeys`<`ObjectOf`<`G`\>\> extends `never` ? `R` : `Curry`<(...`p`: `G`) => `R`\>
|
||||
|
||||
Curry a [[Function]]
|
||||
|
||||
**`Example`**
|
||||
|
||||
```ts
|
||||
import {F} from 'ts-toolbelt'
|
||||
|
||||
/// If you are looking for creating types for `curry`
|
||||
/// It handles placeholders and variable arguments
|
||||
declare function curry<Fn extends F.Function>(fn: Fn): F.Curry<Fn>
|
||||
```
|
||||
|
||||
#### Type parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `P` | extends [separator: string \| typeof \_, str: string \| typeof \_] |
|
||||
| `G` | extends readonly `any`[] = `GapsOf`<`P`, [separator: string, str: string]\> |
|
||||
| `R` | extends `unknown` = `string` |
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `...p` | `P` \| [separator: string \| typeof \_, str: string \| typeof \_] |
|
||||
|
||||
#### Returns
|
||||
|
||||
`RequiredKeys`<`ObjectOf`<`G`\>\> extends `never` ? `R` : `Curry`<(...`p`: `G`) => `R`\>
|
||||
|
||||
[[Function]]
|
||||
|
||||
#### Defined in
|
||||
|
||||
node_modules/ts-toolbelt/out/Function/Curry.d.ts:77
|
||||
|
||||
___
|
||||
|
||||
### endsWith
|
||||
|
||||
▸ **endsWith**<`P`, `G`, `R`\>(`...p`): `RequiredKeys`<`ObjectOf`<`G`\>\> extends `never` ? `R` : `Curry`<(...`p`: `G`) => `R`\>
|
||||
@@ -84,6 +172,48 @@ node_modules/ts-toolbelt/out/Function/Curry.d.ts:77
|
||||
|
||||
___
|
||||
|
||||
### rtrim
|
||||
|
||||
▸ **rtrim**<`P`, `G`, `R`\>(`...p`): `RequiredKeys`<`ObjectOf`<`G`\>\> extends `never` ? `R` : `Curry`<(...`p`: `G`) => `R`\>
|
||||
|
||||
Curry a [[Function]]
|
||||
|
||||
**`Example`**
|
||||
|
||||
```ts
|
||||
import {F} from 'ts-toolbelt'
|
||||
|
||||
/// If you are looking for creating types for `curry`
|
||||
/// It handles placeholders and variable arguments
|
||||
declare function curry<Fn extends F.Function>(fn: Fn): F.Curry<Fn>
|
||||
```
|
||||
|
||||
#### Type parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `P` | extends [cutset: string \| typeof \_, str: string \| typeof \_] |
|
||||
| `G` | extends readonly `any`[] = `GapsOf`<`P`, [cutset: string, str: string]\> |
|
||||
| `R` | extends `unknown` = `string` |
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `...p` | `P` \| [cutset: string \| typeof \_, str: string \| typeof \_] |
|
||||
|
||||
#### Returns
|
||||
|
||||
`RequiredKeys`<`ObjectOf`<`G`\>\> extends `never` ? `R` : `Curry`<(...`p`: `G`) => `R`\>
|
||||
|
||||
[[Function]]
|
||||
|
||||
#### Defined in
|
||||
|
||||
node_modules/ts-toolbelt/out/Function/Curry.d.ts:77
|
||||
|
||||
___
|
||||
|
||||
### startsWith
|
||||
|
||||
▸ **startsWith**<`P`, `G`, `R`\>(`...p`): `RequiredKeys`<`ObjectOf`<`G`\>\> extends `never` ? `R` : `Curry`<(...`p`: `G`) => `R`\>
|
||||
@@ -123,3 +253,45 @@ declare function curry<Fn extends F.Function>(fn: Fn): F.Curry<Fn>
|
||||
#### Defined in
|
||||
|
||||
node_modules/ts-toolbelt/out/Function/Curry.d.ts:77
|
||||
|
||||
___
|
||||
|
||||
### trim
|
||||
|
||||
▸ **trim**<`P`, `G`, `R`\>(`...p`): `RequiredKeys`<`ObjectOf`<`G`\>\> extends `never` ? `R` : `Curry`<(...`p`: `G`) => `R`\>
|
||||
|
||||
Curry a [[Function]]
|
||||
|
||||
**`Example`**
|
||||
|
||||
```ts
|
||||
import {F} from 'ts-toolbelt'
|
||||
|
||||
/// If you are looking for creating types for `curry`
|
||||
/// It handles placeholders and variable arguments
|
||||
declare function curry<Fn extends F.Function>(fn: Fn): F.Curry<Fn>
|
||||
```
|
||||
|
||||
#### Type parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `P` | extends [cutset: string \| typeof \_, str: string \| typeof \_] |
|
||||
| `G` | extends readonly `any`[] = `GapsOf`<`P`, [cutset: string, str: string]\> |
|
||||
| `R` | extends `unknown` = `any` |
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `...p` | `P` \| [cutset: string \| typeof \_, str: string \| typeof \_] |
|
||||
|
||||
#### Returns
|
||||
|
||||
`RequiredKeys`<`ObjectOf`<`G`\>\> extends `never` ? `R` : `Curry`<(...`p`: `G`) => `R`\>
|
||||
|
||||
[[Function]]
|
||||
|
||||
#### Defined in
|
||||
|
||||
node_modules/ts-toolbelt/out/Function/Curry.d.ts:77
|
||||
|
||||
Reference in New Issue
Block a user