es-toolkit 1.15.1-dev.443 → 1.15.1-dev.445
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_chunk/{initial-lgfSiJ.js → initial-y0QrPY.js} +12 -11
- package/dist/_internal/compareValues.mjs +3 -3
- package/dist/array/index.js +2 -11
- package/dist/array/orderBy.mjs +2 -9
- package/dist/array/sortBy.d.mts +3 -2
- package/dist/array/sortBy.d.ts +3 -2
- package/dist/array/sortBy.mjs +1 -1
- package/dist/browser.global.js +1 -1
- package/dist/browser.global.js.map +1 -1
- package/dist/compat/index.d.mts +1 -0
- package/dist/compat/index.d.ts +1 -0
- package/dist/compat/index.js +6 -1
- package/dist/compat/index.mjs +1 -0
- package/dist/compat/string/padEnd.d.mts +20 -0
- package/dist/compat/string/padEnd.d.ts +20 -0
- package/dist/compat/string/padEnd.mjs +5 -0
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/compat/index.d.mts
CHANGED
|
@@ -131,5 +131,6 @@ export { matchesProperty } from './predicate/matchesProperty.mjs';
|
|
|
131
131
|
export { startsWith } from './string/startsWith.mjs';
|
|
132
132
|
export { endsWith } from './string/endsWith.mjs';
|
|
133
133
|
export { padStart } from './string/padStart.mjs';
|
|
134
|
+
export { padEnd } from './string/padEnd.mjs';
|
|
134
135
|
export { max } from './math/max.mjs';
|
|
135
136
|
export { min } from './math/min.mjs';
|
package/dist/compat/index.d.ts
CHANGED
|
@@ -131,5 +131,6 @@ export { matchesProperty } from './predicate/matchesProperty.js';
|
|
|
131
131
|
export { startsWith } from './string/startsWith.js';
|
|
132
132
|
export { endsWith } from './string/endsWith.js';
|
|
133
133
|
export { padStart } from './string/padStart.js';
|
|
134
|
+
export { padEnd } from './string/padEnd.js';
|
|
134
135
|
export { max } from './math/max.js';
|
|
135
136
|
export { min } from './math/min.js';
|
package/dist/compat/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
4
|
|
|
5
|
-
const initial = require('../_chunk/initial-
|
|
5
|
+
const initial = require('../_chunk/initial-y0QrPY.js');
|
|
6
6
|
const promise_index = require('../_chunk/index-CwRt_M.js');
|
|
7
7
|
const function_index = require('../function/index.js');
|
|
8
8
|
const math_index = require('../math/index.js');
|
|
@@ -775,6 +775,10 @@ function padStart(str, length = 0, chars = ' ') {
|
|
|
775
775
|
return str.padStart(length, chars);
|
|
776
776
|
}
|
|
777
777
|
|
|
778
|
+
function padEnd(str, length = 0, chars = ' ') {
|
|
779
|
+
return str.padEnd(length, chars);
|
|
780
|
+
}
|
|
781
|
+
|
|
778
782
|
function max(items = []) {
|
|
779
783
|
let maxElement = items[0];
|
|
780
784
|
let max = undefined;
|
|
@@ -929,6 +933,7 @@ exports.merge = merge;
|
|
|
929
933
|
exports.mergeWith = mergeWith;
|
|
930
934
|
exports.min = min;
|
|
931
935
|
exports.orderBy = orderBy;
|
|
936
|
+
exports.padEnd = padEnd;
|
|
932
937
|
exports.padStart = padStart;
|
|
933
938
|
exports.property = property;
|
|
934
939
|
exports.set = set;
|
package/dist/compat/index.mjs
CHANGED
|
@@ -131,5 +131,6 @@ export { matchesProperty } from './predicate/matchesProperty.mjs';
|
|
|
131
131
|
export { startsWith } from './string/startsWith.mjs';
|
|
132
132
|
export { endsWith } from './string/endsWith.mjs';
|
|
133
133
|
export { padStart } from './string/padStart.mjs';
|
|
134
|
+
export { padEnd } from './string/padEnd.mjs';
|
|
134
135
|
export { max } from './math/max.mjs';
|
|
135
136
|
export { min } from './math/min.mjs';
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pads the end of a string with a given character until it reaches the specified length.
|
|
3
|
+
*
|
|
4
|
+
* If the length is less than or equal to the original string's length, or if the padding character is an empty string,
|
|
5
|
+
* the original string is returned unchanged.
|
|
6
|
+
*
|
|
7
|
+
* @param {string} str - The string to pad.
|
|
8
|
+
* @param {number} [length] - The length of the resulting string once padded.
|
|
9
|
+
* @param {string} [chars] - The character(s) to use for padding.
|
|
10
|
+
* @returns {string} - The padded string, or the original string if padding is not required.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* const result1 = padEnd('abc', 6); // result will be 'abc '
|
|
14
|
+
* const result2 = padEnd('abc', 6, '_-'); // result will be 'abc_-_'
|
|
15
|
+
* const result3 = padEnd('abc', 3); // result will be 'abc'
|
|
16
|
+
* const result4 = padEnd('abc', 2); // result will be 'abc'
|
|
17
|
+
*/
|
|
18
|
+
declare function padEnd(str: string, length?: number, chars?: string): string;
|
|
19
|
+
|
|
20
|
+
export { padEnd };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pads the end of a string with a given character until it reaches the specified length.
|
|
3
|
+
*
|
|
4
|
+
* If the length is less than or equal to the original string's length, or if the padding character is an empty string,
|
|
5
|
+
* the original string is returned unchanged.
|
|
6
|
+
*
|
|
7
|
+
* @param {string} str - The string to pad.
|
|
8
|
+
* @param {number} [length] - The length of the resulting string once padded.
|
|
9
|
+
* @param {string} [chars] - The character(s) to use for padding.
|
|
10
|
+
* @returns {string} - The padded string, or the original string if padding is not required.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* const result1 = padEnd('abc', 6); // result will be 'abc '
|
|
14
|
+
* const result2 = padEnd('abc', 6, '_-'); // result will be 'abc_-_'
|
|
15
|
+
* const result3 = padEnd('abc', 3); // result will be 'abc'
|
|
16
|
+
* const result4 = padEnd('abc', 2); // result will be 'abc'
|
|
17
|
+
*/
|
|
18
|
+
declare function padEnd(str: string, length?: number, chars?: string): string;
|
|
19
|
+
|
|
20
|
+
export { padEnd };
|
package/dist/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
4
|
|
|
5
|
-
const initial = require('./_chunk/initial-
|
|
5
|
+
const initial = require('./_chunk/initial-y0QrPY.js');
|
|
6
6
|
const array_index = require('./array/index.js');
|
|
7
7
|
const promise_index = require('./_chunk/index-CwRt_M.js');
|
|
8
8
|
const function_index = require('./function/index.js');
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "es-toolkit",
|
|
3
3
|
"description": "A state-of-the-art, high-performance JavaScript utility library with a small bundle size and strong type annotations.",
|
|
4
|
-
"version": "1.15.1-dev.
|
|
4
|
+
"version": "1.15.1-dev.445+50b48669",
|
|
5
5
|
"homepage": "https://es-toolkit.slash.page",
|
|
6
6
|
"bugs": "https://github.com/toss/es-toolkit/issues",
|
|
7
7
|
"repository": {
|