@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 CHANGED
@@ -2395,8 +2395,8 @@
2395
2395
  */
2396
2396
  const addColors = function (colors) {
2397
2397
  if ((0, numProperties_3.numProperties)(colors)) {
2398
- if (!bbn.vars.colors) {
2399
- bbn.vars.colors = {};
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.vars.colors[n] = v;
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.vars.colors) {
7066
- (0, addColors_1.addColors)(bbn.vars.colors);
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.vars.regexp.ip.test(st)) {
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.vars.regexp.hostname.test(st)) {
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.vars.regexp.url.test(str)) {
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.vars.shortenLen;
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
- vars: vars_1.vars,
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.vars.colors) {
88
- addColors(bbn.vars.colors);
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.vars.shortenLen;
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.vars.colors) {
21
- bbn.vars.colors = {};
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.vars.colors[n] = v;
29
+ bbn.var.colors[n] = v;
30
30
  sheet.insertRule(".bbn-" +
31
31
  n +
32
32
  ", .bbn-color-text-" +
@@ -7,7 +7,7 @@ const isHostname = function (...args) {
7
7
  if (!isString(st)) {
8
8
  return false;
9
9
  }
10
- if (!isIP(st) && !bbn.vars.regexp.hostname.test(st)) {
10
+ if (!isIP(st) && !bbn.var.regexp.hostname.test(st)) {
11
11
  return false;
12
12
  }
13
13
  }
@@ -3,7 +3,7 @@ const isIP = function (...args) {
3
3
  if (!args.length)
4
4
  return false;
5
5
  for (let st of args) {
6
- if (!isString(st) || !bbn.vars.regexp.ip.test(st)) {
6
+ if (!isString(st) || !bbn.var.regexp.ip.test(st)) {
7
7
  return false;
8
8
  }
9
9
  }
@@ -2,7 +2,7 @@ const isURL = function (...args) {
2
2
  if (!args.length)
3
3
  return false;
4
4
  for (let str of args) {
5
- if (!bbn.vars.regexp.url.test(str)) {
5
+ if (!bbn.var.regexp.url.test(str)) {
6
6
  return false;
7
7
  }
8
8
  }
package/dist/index.js CHANGED
@@ -14,7 +14,7 @@ const bbn = {
14
14
  _,
15
15
  $,
16
16
  lng,
17
- vars,
17
+ var: vars,
18
18
  env,
19
19
  db,
20
20
  fn
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bbn/bbn",
3
- "version": "1.0.66",
3
+ "version": "1.0.67",
4
4
  "description": "Javascript toolkit",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",