@bigbinary/neeto-commons-frontend 2.1.34 → 2.1.35
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/README.md +1 -0
- package/initializers.cjs.js +81 -17
- package/initializers.cjs.js.map +1 -1
- package/initializers.js +82 -18
- package/initializers.js.map +1 -1
- package/package.json +1 -1
- package/utils.cjs.js +9 -0
- package/utils.cjs.js.map +1 -1
- package/utils.d.ts +12 -0
- package/utils.js +9 -1
- package/utils.js.map +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bigbinary/neeto-commons-frontend",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.35",
|
|
4
4
|
"description": "A package encapsulating common code across neeto projects including initializers, utility functions, common components and hooks and so on.",
|
|
5
5
|
"repository": "git@github.com:bigbinary/neeto-commons-frontend.git",
|
|
6
6
|
"author": "Amaljith K <amaljith.k@bigbinary.com>",
|
package/utils.cjs.js
CHANGED
|
@@ -2638,6 +2638,14 @@ var joinHyphenCase = function joinHyphenCase() {
|
|
|
2638
2638
|
}
|
|
2639
2639
|
return args.join(" ").replace(/\s+/g, "-").toLowerCase();
|
|
2640
2640
|
};
|
|
2641
|
+
var hyphenize = function hyphenize(value) {
|
|
2642
|
+
var fallbackString = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
|
|
2643
|
+
if (typeof value === "number") return String(value);
|
|
2644
|
+
if (value && typeof value === "string" && value.replace) {
|
|
2645
|
+
return value.replace(/[\s_]/g, "-").replace(/([a-z])([A-Z])/g, "$1-$2").replace(/-+/g, "-").toLowerCase();
|
|
2646
|
+
}
|
|
2647
|
+
return fallbackString;
|
|
2648
|
+
};
|
|
2641
2649
|
var debounce = function debounce(func) {
|
|
2642
2650
|
var delay = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 350;
|
|
2643
2651
|
var timer;
|
|
@@ -3293,6 +3301,7 @@ exports.getSubdomain = getSubdomain;
|
|
|
3293
3301
|
exports.hasAllPermissions = hasAllPermissions;
|
|
3294
3302
|
exports.hasAnyPermission = hasAnyPermission;
|
|
3295
3303
|
exports.hasPermission = hasPermission;
|
|
3304
|
+
exports.hyphenize = hyphenize;
|
|
3296
3305
|
exports.joinHyphenCase = joinHyphenCase;
|
|
3297
3306
|
exports.removeFromLocalStorage = removeFromLocalStorage;
|
|
3298
3307
|
exports.resetAuthTokens = resetAuthTokens;
|