Skip to content

Commit 754f6df

Browse files
committed
Release v1.4.6
1 parent 0f36f4b commit 754f6df

11 files changed

Lines changed: 56 additions & 5 deletions

File tree

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
## [1.4.6](https://github.com/rudashi/stringable/compare/v1.4.5...v1.4.6) (2024-02-14)
2+
3+
### Feature
4+
* Add `take` method
5+
* Add `unwrap` method
6+
17
## [1.4.5](https://github.com/rudashi/stringable/compare/v1.4.4...v1.4.5) (2024-01-28)
28

39
### Feature

dist/Str.js

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/Str.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/Stringable.js

Lines changed: 18 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/Stringable.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/methods.js

Lines changed: 18 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/methods.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "stringable-laravel",
3-
"version": "1.4.5",
3+
"version": "1.4.6",
44
"description": "Javascript Version's of Laravel's Illuminate\\Support\\Str",
55
"main": "dist/index.js",
66
"types": "types/index.d.ts",

types/Str.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ export declare const Str: {
7070
reverse: (value: string) => string;
7171
start: (value: string, prefix: string) => string;
7272
upper: (value: string) => string;
73+
take: (value: string, limit: number) => string;
7374
title: (value: string) => string;
7475
headline: (value: string) => string;
7576
slug: (title: string, separator?: string, language?: string | null, dictionary?: Record<string, string>) => string;
@@ -92,6 +93,7 @@ export declare const Str: {
9293
uuid: () => Stringable;
9394
ulid: () => Stringable;
9495
preg_quote: (value: string, delimiter?: string) => string;
96+
unwrap: (value: string, before: string, after?: string | undefined) => string;
9597
flushCache(): void;
9698
};
9799
export default Str;

types/Stringable.d.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ export declare const str: (string?: string) => Stringable | {
6868
reverse: (value: string) => string;
6969
start: (value: string, prefix: string) => string;
7070
upper: (value: string) => string;
71+
take: (value: string, limit: number) => string;
7172
title: (value: string) => string;
7273
headline: (value: string) => string;
7374
slug: (title: string, separator?: string, language?: string | null, dictionary?: Record<string, string>) => string;
@@ -90,6 +91,7 @@ export declare const str: (string?: string) => Stringable | {
9091
uuid: () => Stringable;
9192
ulid: () => Stringable;
9293
preg_quote: (value: string, delimiter?: string) => string;
94+
unwrap: (value: string, before: string, after?: string | undefined) => string;
9395
flushCache(): void;
9496
};
9597
export declare class Stringable {
@@ -192,6 +194,8 @@ export declare class Stringable {
192194
words: (words?: number, end?: string) => this;
193195
wordWrap: (width?: number, breaks?: string, cut?: boolean) => this;
194196
wrap: (before: string, after?: string) => this;
197+
take: (limit: number) => this;
198+
unwrap: (before: string, after?: string) => this;
195199
toHtmlString: () => Element | Node | null;
196200
dump: () => this;
197201
dd: () => never;

0 commit comments

Comments
 (0)