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.
@@ -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';
@@ -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';
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
4
 
5
- const initial = require('../_chunk/initial-lgfSiJ.js');
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;
@@ -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 };
@@ -0,0 +1,5 @@
1
+ function padEnd(str, length = 0, chars = ' ') {
2
+ return str.padEnd(length, chars);
3
+ }
4
+
5
+ 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-lgfSiJ.js');
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.443+d4037c75",
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": {