@thi.ng/strings
Advanced tools
Comparing version 0.4.3 to 0.5.0
@@ -18,4 +18,4 @@ import { Stringer } from "./api"; | ||
* @param lineWidth target length | ||
* @param ch pad character(s) | ||
* @param pad pad character(s) | ||
*/ | ||
export declare const center: (lineWidth: number, ch?: string | number) => Stringer<any>; | ||
export declare const center: (lineWidth: number, pad?: string | number) => Stringer<any>; |
@@ -22,6 +22,6 @@ "use strict"; | ||
* @param lineWidth target length | ||
* @param ch pad character(s) | ||
* @param pad pad character(s) | ||
*/ | ||
exports.center = memoizej_1.memoizeJ((n, ch = " ") => { | ||
const buf = repeat_1.repeat(ch, n); | ||
exports.center = memoizej_1.memoizeJ((n, pad = " ") => { | ||
const buf = repeat_1.repeat(pad, n); | ||
return (x) => { | ||
@@ -28,0 +28,0 @@ if (x == null) |
@@ -6,2 +6,14 @@ # Change Log | ||
<a name="0.5.0"></a> | ||
# [0.5.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/strings@0.4.3...@thi.ng/strings@0.5.0) (2018-09-25) | ||
### Features | ||
* **strings:** add splice(), refactor repeat(), add tests ([0cce048](https://github.com/thi-ng/umbrella/commit/0cce048)) | ||
<a name="0.4.3"></a> | ||
@@ -8,0 +20,0 @@ ## [0.4.3](https://github.com/thi-ng/umbrella/compare/@thi.ng/strings@0.4.2...@thi.ng/strings@0.4.3) (2018-09-24) |
@@ -12,4 +12,5 @@ export * from "./api"; | ||
export * from "./repeat"; | ||
export * from "./splice"; | ||
export * from "./truncate"; | ||
export * from "./truncate-left"; | ||
export * from "./wrap"; |
@@ -16,4 +16,5 @@ "use strict"; | ||
__export(require("./repeat")); | ||
__export(require("./splice")); | ||
__export(require("./truncate")); | ||
__export(require("./truncate-left")); | ||
__export(require("./wrap")); |
{ | ||
"name": "@thi.ng/strings", | ||
"version": "0.4.3", | ||
"version": "0.5.0", | ||
"description": "Various string formatting & utility functions", | ||
@@ -31,2 +31,3 @@ "main": "./index.js", | ||
"dependencies": { | ||
"@thi.ng/errors": "^0.1.9", | ||
"@thi.ng/memoize": "^0.2.3" | ||
@@ -47,3 +48,3 @@ }, | ||
}, | ||
"gitHead": "febe3c36d4c7e5a5f71ca89a68d27eeb8278397d" | ||
"gitHead": "04872dbe30d6c521c59ebaef57acb61b9cd0ae40" | ||
} |
@@ -24,3 +24,3 @@ # @thi.ng/strings | ||
Various higher-order, but low-level string formatting & utility | ||
functions, some memoized. WIP / Alpha. | ||
functions, some memoized. WIP / Alpha. Please sources for now. | ||
@@ -27,0 +27,0 @@ ## Installation |
@@ -8,2 +8,2 @@ "use strict"; | ||
*/ | ||
exports.repeat = memoizej_1.memoizeJ((ch, n) => new Array(n).fill(ch).join("")); | ||
exports.repeat = memoizej_1.memoizeJ((ch, n) => ch.repeat(n)); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
30999
36
465
2
+ Added@thi.ng/errors@^0.1.9