@bbn/bbn 1.0.310 → 1.0.312

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.
@@ -100,7 +100,6 @@ export default function ajax(url, datatype, data, success, failure, abort) {
100
100
  }
101
101
  var requestId_1 = getRequestId(url, data, datatype);
102
102
  var loaderObj = getLoader(requestId_1);
103
- //log("IN AJAX", loaderObj? loaderObj.loader : "NO LOADER")
104
103
  if (loaderObj === null || loaderObj === void 0 ? void 0 : loaderObj.loader) {
105
104
  return loaderObj.loader;
106
105
  }
@@ -17,13 +17,17 @@
17
17
  * @returns {*}
18
18
  */
19
19
  export default function hex2rgb(hex) {
20
+ if (hex.charAt(0) !== "#") {
21
+ hex = "#" + hex;
22
+ }
23
+ if (hex.length === 4) {
24
+ hex = "#" + hex[1] + hex[1] + hex[2] + hex[2] + hex[3] + hex[3];
25
+ }
20
26
  var result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
21
- return result
22
- ? {
23
- r: parseInt(result[1], 16),
24
- g: parseInt(result[2], 16),
25
- b: parseInt(result[3], 16),
26
- }
27
- : null;
27
+ return result ? {
28
+ r: parseInt(result[1], 16),
29
+ g: parseInt(result[2], 16),
30
+ b: parseInt(result[3], 16),
31
+ } : null;
28
32
  }
29
33
  ;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bbn/bbn",
3
- "version": "1.0.310",
3
+ "version": "1.0.312",
4
4
  "description": "Javascript toolkit",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",