Skip to content

Commit b6bc55e

Browse files
committed
Release v1.4.0
1 parent b488511 commit b6bc55e

File tree

5 files changed

+740
-75
lines changed

5 files changed

+740
-75
lines changed

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
## [1.4.0](https://github.com/rudashi/stringable/compare/v1.3.1...v1.4.0) (2023-03-10)
2+
3+
### Feature
4+
* Add `of` method to `Str`
5+
* Add `str` function
6+
7+
### Refactor
8+
* Extracted static methods from `Stringable` to `methods` and `Str`
9+
110
## [1.3.1](https://github.com/rudashi/stringable/compare/v1.3.0...v1.3.1) (2023-03-06)
211

312
### Feature

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -65,19 +65,19 @@ chain multiple string operations together using a more readable syntax compared
6565
List of all fluent methods you can find [here](docs/methods.md#fluent-methods).
6666

6767
## Strings methods
68-
- [Str.preg_quote](docs/methods.md#strpregquote)
69-
- [Str.random](docs/methods.md#strrandom)
70-
- [Str.createRandomStringsUsing](docs/methods.md#strcreaterandomstringsusing)
71-
- [Str.createRandomStringsUsingSequence](docs/methods.md#strcreaterandomstringsusingsequence)
72-
- [Str.createRandomStringsNormally](docs/methods.md#strcreaterandomstringsnormally)
73-
- [Str.substr](docs/methods.md#strsubstr)
74-
- [Str.ulid](docs/methods.md#strulid)
75-
- [Str.uuid](docs/methods.md#struuid)
68+
List of all static methods you can find [here](docs/statics.md#strings).
7669

7770
## TO DO
71+
- [charAt](docs/methods.md#charat)
72+
- [isMatch](docs/methods.md#ismatch)
7873
- [plural](docs/methods.md#plural)
7974
- [singular](docs/methods.md#singular)
80-
- [Str.orderedUuid](docs/methods.md#strordereduuid)
75+
76+
and for `Str`
77+
- [charAt](docs/statics.md#charat)
78+
- [isMatch](docs/statics.md#ismatch)
79+
- [password](docs/statics.md#password)
80+
- [orderedUuid](docs/statics.md#ordereduuid)
8181

8282
## Changelog
8383

docs/methods.md

Lines changed: 6 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
- [beforeLast](#beforelast)
1010
- [between](#between)
1111
- [betweenFirst](#betweenfirst)
12+
- [charAt](#charat)
1213
- [camel](#camel)
1314
- [contains](#contains)
1415
- [containsAll](#containsall)
@@ -29,6 +30,7 @@
2930
- [isJson](#isjson)
3031
- [isUlid](#isulid)
3132
- [isUuid](#isuuid)
33+
- [isMatch](#ismatch)
3234
- [kebab](#kebab)
3335
- [lcfirst](#lcfirst)
3436
- [length](#length)
@@ -167,6 +169,8 @@ Stringable.of('[a] bc [d]').betweenFirst('[', ']');
167169

168170
// 'a'
169171
```
172+
### charAt
173+
Not implemented
170174
### camel
171175
The `camel` method converts the given string to `camelCase`:
172176
```js
@@ -381,6 +385,8 @@ Stringable.of('Taylor').isUuid();
381385

382386
// false
383387
```
388+
### isMatch
389+
Not Implemented
384390
### kebab
385391
The `kebab` method converts the given string to `kebab-case`:
386392
```js
@@ -994,69 +1000,4 @@ The `value` method returns the underlying string value.
9941000
Stringable.of('foo').value();
9951001

9961002
// 'foo'
997-
```
998-
## Strings
999-
### Str.orderedUuid
1000-
Not implemented
1001-
### Str.preg_quote
1002-
The `Str.preg_quote` method quote regular expression characters:
1003-
```js
1004-
Str.preg_quote('*RRRING* Hello?');
1005-
1006-
// '\*RRRING\* Hello\?'
1007-
```
1008-
### Str.random
1009-
The `Str.random` method generates a random string of the specified length:
1010-
```js
1011-
Str.random(40);
1012-
```
1013-
### Str.createRandomStringsUsing
1014-
The `Str.createRandomStringsUsing` method allows to intercept and control the random string generation.
1015-
```js
1016-
Str.createRandomStringsUsing((length) => `xyz|${length}`);
1017-
Str.random(7);
1018-
1019-
// 'xyz:7'
1020-
```
1021-
### Str.createRandomStringsUsingSequence
1022-
The `Str.createRandomStringsUsingSequence` method allows to set a sequence that will be used to generate random strings.
1023-
```js
1024-
Str.createRandomStringsUsingSequence({0: 'x', 2: 'y', 3: 'z'});
1025-
1026-
Str.random();
1027-
// 'x'
1028-
Str.random();
1029-
// random String
1030-
Str.random();
1031-
// 'y'
1032-
```
1033-
### Str.createRandomStringsNormally
1034-
The `Str.createRandomStringsNormally` method resets to default random string generator.
1035-
```js
1036-
Str.createRandomStringsUsing((length) => `xyz|${length}`);
1037-
Str.createRandomStringsNormally();
1038-
Str.random(7);
1039-
1040-
// random 7 characters
1041-
```
1042-
### Str.substr
1043-
The `Str.substr` method returns the portion of string specified by the start and length parameters:
1044-
```js
1045-
Str.substr('The Laravel Framework', 4, 7);
1046-
1047-
// 'Laravel'
1048-
```
1049-
### Str.uuid
1050-
The `Str.uuid` method generates a UUID (version 4):
1051-
```js
1052-
Str.uuid();
1053-
1054-
// Stringable object
1055-
```
1056-
### Str.ulid
1057-
The `Str.ulid` method generates a ULID:
1058-
```js
1059-
Str.ulid();
1060-
1061-
// Stringable object
10621003
```

0 commit comments

Comments
 (0)