@bbn/bbn 1.0.66 → 1.0.67
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/dist/bundle.js +10 -10
- package/dist/fn/init.js +2 -2
- package/dist/fn/string/shorten.js +1 -1
- package/dist/fn/style/addColors.js +3 -3
- package/dist/fn/type/isHostname.js +1 -1
- package/dist/fn/type/isIP.js +1 -1
- package/dist/fn/type/isURL.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/bundle.js
CHANGED
|
@@ -2395,8 +2395,8 @@
|
|
|
2395
2395
|
*/
|
|
2396
2396
|
const addColors = function (colors) {
|
|
2397
2397
|
if ((0, numProperties_3.numProperties)(colors)) {
|
|
2398
|
-
if (!bbn.
|
|
2399
|
-
bbn.
|
|
2398
|
+
if (!bbn.var.colors) {
|
|
2399
|
+
bbn.var.colors = {};
|
|
2400
2400
|
}
|
|
2401
2401
|
let element = document.createElement("style");
|
|
2402
2402
|
document.head.appendChild(element);
|
|
@@ -2404,7 +2404,7 @@
|
|
|
2404
2404
|
// Append style element to head
|
|
2405
2405
|
let i = 0;
|
|
2406
2406
|
(0, iterate_4.iterate)(colors, (v, n) => {
|
|
2407
|
-
bbn.
|
|
2407
|
+
bbn.var.colors[n] = v;
|
|
2408
2408
|
sheet.insertRule(".bbn-" +
|
|
2409
2409
|
n +
|
|
2410
2410
|
", .bbn-color-text-" +
|
|
@@ -7062,8 +7062,8 @@
|
|
|
7062
7062
|
bbn.env.params.push(v);
|
|
7063
7063
|
}
|
|
7064
7064
|
});
|
|
7065
|
-
if (bbn.
|
|
7066
|
-
(0, addColors_1.addColors)(bbn.
|
|
7065
|
+
if (bbn.var.colors) {
|
|
7066
|
+
(0, addColors_1.addColors)(bbn.var.colors);
|
|
7067
7067
|
}
|
|
7068
7068
|
if (bbn.env.lang && undefined !== dayjs) {
|
|
7069
7069
|
dayjs.locale(bbn.env.lang);
|
|
@@ -7465,7 +7465,7 @@
|
|
|
7465
7465
|
if (!args.length)
|
|
7466
7466
|
return false;
|
|
7467
7467
|
for (let st of args) {
|
|
7468
|
-
if (!(0, isString_21.isString)(st) || !bbn.
|
|
7468
|
+
if (!(0, isString_21.isString)(st) || !bbn.var.regexp.ip.test(st)) {
|
|
7469
7469
|
return false;
|
|
7470
7470
|
}
|
|
7471
7471
|
}
|
|
@@ -7484,7 +7484,7 @@
|
|
|
7484
7484
|
if (!(0, isString_22.isString)(st)) {
|
|
7485
7485
|
return false;
|
|
7486
7486
|
}
|
|
7487
|
-
if (!(0, isIP_1.isIP)(st) && !bbn.
|
|
7487
|
+
if (!(0, isIP_1.isIP)(st) && !bbn.var.regexp.hostname.test(st)) {
|
|
7488
7488
|
return false;
|
|
7489
7489
|
}
|
|
7490
7490
|
}
|
|
@@ -7687,7 +7687,7 @@
|
|
|
7687
7687
|
if (!args.length)
|
|
7688
7688
|
return false;
|
|
7689
7689
|
for (let str of args) {
|
|
7690
|
-
if (!bbn.
|
|
7690
|
+
if (!bbn.var.regexp.url.test(str)) {
|
|
7691
7691
|
return false;
|
|
7692
7692
|
}
|
|
7693
7693
|
}
|
|
@@ -9305,7 +9305,7 @@
|
|
|
9305
9305
|
const shorten = function (st, len, adj) {
|
|
9306
9306
|
if (typeof st.toLowerCase() === "string") {
|
|
9307
9307
|
if (!len) {
|
|
9308
|
-
len = bbn.
|
|
9308
|
+
len = bbn.var.shortenLen;
|
|
9309
9309
|
}
|
|
9310
9310
|
if (adj === undefined || !(0, isString_25.isString)(adj)) {
|
|
9311
9311
|
adj = "...";
|
|
@@ -10000,7 +10000,7 @@
|
|
|
10000
10000
|
_: _2._,
|
|
10001
10001
|
$: _3.$,
|
|
10002
10002
|
lng: lng_1.lng,
|
|
10003
|
-
|
|
10003
|
+
var: vars_1.vars,
|
|
10004
10004
|
env: env_1.env,
|
|
10005
10005
|
db: db_1.db,
|
|
10006
10006
|
fn: fn_1.fn
|
package/dist/fn/init.js
CHANGED
|
@@ -84,8 +84,8 @@ const init = function (cfg, force) {
|
|
|
84
84
|
bbn.env.params.push(v);
|
|
85
85
|
}
|
|
86
86
|
});
|
|
87
|
-
if (bbn.
|
|
88
|
-
addColors(bbn.
|
|
87
|
+
if (bbn.var.colors) {
|
|
88
|
+
addColors(bbn.var.colors);
|
|
89
89
|
}
|
|
90
90
|
if (bbn.env.lang && undefined !== dayjs) {
|
|
91
91
|
dayjs.locale(bbn.env.lang);
|
|
@@ -28,7 +28,7 @@ import { substr } from "./substr";
|
|
|
28
28
|
const shorten = function (st, len, adj) {
|
|
29
29
|
if (typeof st.toLowerCase() === "string") {
|
|
30
30
|
if (!len) {
|
|
31
|
-
len = bbn.
|
|
31
|
+
len = bbn.var.shortenLen;
|
|
32
32
|
}
|
|
33
33
|
if (adj === undefined || !isString(adj)) {
|
|
34
34
|
adj = "...";
|
|
@@ -17,8 +17,8 @@ import { iterate } from "../loop/iterate";
|
|
|
17
17
|
*/
|
|
18
18
|
const addColors = function (colors) {
|
|
19
19
|
if (numProperties(colors)) {
|
|
20
|
-
if (!bbn.
|
|
21
|
-
bbn.
|
|
20
|
+
if (!bbn.var.colors) {
|
|
21
|
+
bbn.var.colors = {};
|
|
22
22
|
}
|
|
23
23
|
let element = document.createElement("style");
|
|
24
24
|
document.head.appendChild(element);
|
|
@@ -26,7 +26,7 @@ const addColors = function (colors) {
|
|
|
26
26
|
// Append style element to head
|
|
27
27
|
let i = 0;
|
|
28
28
|
iterate(colors, (v, n) => {
|
|
29
|
-
bbn.
|
|
29
|
+
bbn.var.colors[n] = v;
|
|
30
30
|
sheet.insertRule(".bbn-" +
|
|
31
31
|
n +
|
|
32
32
|
", .bbn-color-text-" +
|
package/dist/fn/type/isIP.js
CHANGED
package/dist/fn/type/isURL.js
CHANGED
package/dist/index.js
CHANGED