Skip to content

Commit

Permalink
Release v1.4.1
Browse files Browse the repository at this point in the history
  • Loading branch information
rudashi committed Mar 18, 2023
1 parent 3e15cb6 commit 62dab21
Show file tree
Hide file tree
Showing 14 changed files with 86 additions and 15 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## [1.4.1](https://github.com/rudashi/stringable/compare/v1.4.0...v1.4.1) (2023-03-18)

### Feature
* Add `charAt` method
* Add `isMatch` method

## [1.4.0](https://github.com/rudashi/stringable/compare/v1.3.1...v1.4.0) (2023-03-10)

### Feature
Expand Down
4 changes: 0 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,10 @@ List of all fluent methods you can find [here](docs/methods.md#fluent-methods).
List of all static methods you can find [here](docs/statics.md#strings).

## TO DO
- [charAt](docs/methods.md#charat)
- [isMatch](docs/methods.md#ismatch)
- [plural](docs/methods.md#plural)
- [singular](docs/methods.md#singular)

and for `Str`
- [charAt](docs/statics.md#charat)
- [isMatch](docs/statics.md#ismatch)
- [password](docs/statics.md#password)
- [orderedUuid](docs/statics.md#ordereduuid)

Expand Down
4 changes: 3 additions & 1 deletion dist/Str.js

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

2 changes: 1 addition & 1 deletion dist/Str.js.map

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

16 changes: 16 additions & 0 deletions dist/Stringable.js

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

2 changes: 1 addition & 1 deletion dist/Stringable.js.map

Large diffs are not rendered by default.

19 changes: 17 additions & 2 deletions dist/methods.js

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

2 changes: 1 addition & 1 deletion dist/methods.js.map

Large diffs are not rendered by default.

18 changes: 16 additions & 2 deletions docs/methods.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,12 @@ Stringable.of('[a] bc [d]').betweenFirst('[', ']');
// 'a'
```
### charAt
Not implemented
The `charAt` method allows to get a character by index from a multibyte string:
```js
Stringable.of('Hello, world!').charAt(1);

// 'e'
```
### camel
The `camel` method converts the given string to `camelCase`:
```js
Expand Down Expand Up @@ -386,7 +391,16 @@ Stringable.of('Taylor').isUuid();
// false
```
### isMatch
Not Implemented
The `isMatch` method will return `true` if the string matches a given regular expression:
```js
Stringable.of('foo bar').isMatch(/foo (.*)/);

// true

Stringable.of('laravel').isMatch(/foo (.*)/);

// false
```
### kebab
The `kebab` method converts the given string to `kebab-case`:
```js
Expand Down
18 changes: 16 additions & 2 deletions docs/statics.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,12 @@ Str.betweenFirst('[a] bc [d]', '[', ']');
// 'a'
```
### charAt
Not implemented
The `charAt` function allows to get a character by index from a multibyte string:
```js
Str.charAt('Hello, world!', 1);

// 'e'
```
### camel
The `camel` function converts the given string to `camelCase`:
```js
Expand Down Expand Up @@ -283,7 +288,16 @@ Str.isUuid('Taylor');
// false
```
### isMatch
Not implemented
The `isMatch` function will return `true` if the string matches a given regular expression:
```js
Str.isMatch(/foo (.*)/, 'foo bar');

// true

Str.isMatch(/foo (.*)/, 'laravel');

// false
```
### kebab
The `kebab` function converts the given string to `kebab-case`:
```js
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "stringable-laravel",
"version": "1.4.0",
"version": "1.4.1",
"description": "Javascript Version's of Laravel's Illuminate\\Support\\Str",
"main": "dist/index.js",
"types": "types/index.d.ts",
Expand Down
2 changes: 2 additions & 0 deletions types/Str.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export declare const Str: {
beforeLast: (subject: string, search?: string) => string;
between: (subject: string, from?: string, to?: string) => string;
betweenFirst: (subject: string, from?: string, to?: string) => string;
charAt: (subject: string, index: number) => string | false;
camel: (value: string) => string;
contains: (haystack: string, needles: string | string[], ignoreCase?: boolean) => boolean;
containsAll: (haystack: string, needles: string[], ignoreCase?: boolean) => boolean;
Expand All @@ -47,6 +48,7 @@ export declare const Str: {
inlineMarkdown: (string: string, options?: MarkdownConfiguration) => string;
mask: (string: string, character: string, index: number, length?: number | null) => string;
match: (pattern: string | RegExp, subject: string) => string;
isMatch: (pattern: string | RegExp | (string | RegExp)[], value: string) => boolean;
matchAll: (pattern: string | RegExp, subject: string) => string[];
padBoth: (value: string, length?: number, pad?: string) => string;
padLeft: (value: string, length?: number, pad?: string) => string;
Expand Down
Loading

0 comments on commit 62dab21

Please sign in to comment.