@bbn/bbn 1.0.310 → 1.0.311

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.
@@ -2,6 +2,7 @@ import isObject from '../type/isObject.js';
2
2
  import replaceAll from '../string/replaceAll.js';
3
3
  import getRequestId from './getRequestId.js';
4
4
  import getLoader from './getLoader.js';
5
+ import log from '../browser/log.js';
5
6
  import extend from '../object/extend.js';
6
7
  import numProperties from '../object/numProperties.js';
7
8
  import _deleteLoader from './_deleteLoader.js';
@@ -100,8 +101,8 @@ export default function ajax(url, datatype, data, success, failure, abort) {
100
101
  }
101
102
  var requestId_1 = getRequestId(url, data, datatype);
102
103
  var loaderObj = getLoader(requestId_1);
103
- //log("IN AJAX", loaderObj? loaderObj.loader : "NO LOADER")
104
104
  if (loaderObj === null || loaderObj === void 0 ? void 0 : loaderObj.loader) {
105
+ log("LOADER EXISTS", loaderObj);
105
106
  return loaderObj.loader;
106
107
  }
107
108
  if (bbn.env.token) {
@@ -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.311",
4
4
  "description": "Javascript toolkit",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",