@thi.ng/strings
Advanced tools
Comparing version 0.6.0 to 0.7.0
@@ -24,2 +24,7 @@ import { Stringer } from "./api"; | ||
* | ||
* TODO: Currently broken in Safari & FF due to usage of TC39 stage 4 | ||
* RegEx look-behind expression: | ||
* | ||
* https://github.com/tc39/proposal-regexp-lookbehind | ||
* | ||
* ``` | ||
@@ -26,0 +31,0 @@ * kebab("FooBar23Baz"); |
@@ -25,2 +25,7 @@ "use strict"; | ||
* | ||
* TODO: Currently broken in Safari & FF due to usage of TC39 stage 4 | ||
* RegEx look-behind expression: | ||
* | ||
* https://github.com/tc39/proposal-regexp-lookbehind | ||
* | ||
* ``` | ||
@@ -34,3 +39,3 @@ * kebab("FooBar23Baz"); | ||
*/ | ||
exports.kebab = (x, delim = "-") => exports.lower(x.replace(/(?<=\w)(?=[A-Z])/g, delim)); | ||
exports.kebab = (x, delim = "-") => exports.lower(x.replace(/(?<=[a-z0-9\u00e0-\u00fd])(?=[A-Z\u00c0-\u00dd])/g, (_, i) => (i ? delim : ""))); | ||
/** | ||
@@ -37,0 +42,0 @@ * Short for `kebab` using `_` as delimiter. |
@@ -6,2 +6,18 @@ # Change Log | ||
# [0.7.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/strings@0.6.0...@thi.ng/strings@0.7.0) (2018-12-13) | ||
### Bug Fixes | ||
* **strings:** update kebab() ([1b298f7](https://github.com/thi-ng/umbrella/commit/1b298f7)) | ||
### Features | ||
* **strings:** add slugify() ([8dcc73a](https://github.com/thi-ng/umbrella/commit/8dcc73a)) | ||
# [0.6.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/strings@0.5.2...@thi.ng/strings@0.6.0) (2018-11-08) | ||
@@ -8,0 +24,0 @@ |
@@ -12,2 +12,3 @@ export * from "./api"; | ||
export * from "./repeat"; | ||
export * from "./slugify"; | ||
export * from "./splice"; | ||
@@ -14,0 +15,0 @@ export * from "./truncate"; |
@@ -16,2 +16,3 @@ "use strict"; | ||
__export(require("./repeat")); | ||
__export(require("./slugify")); | ||
__export(require("./splice")); | ||
@@ -18,0 +19,0 @@ __export(require("./truncate")); |
{ | ||
"name": "@thi.ng/strings", | ||
"version": "0.6.0", | ||
"version": "0.7.0", | ||
"description": "Various string formatting & utility functions", | ||
@@ -47,3 +47,3 @@ "main": "./index.js", | ||
}, | ||
"gitHead": "a4bc35bd5232466a6e4ea1dd13fd11e48bcfa075" | ||
"gitHead": "e36a7ee080147d3ccbb464b0536c0ccc74ae1d01" | ||
} |
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
35374
40
581