@bbn/bbn 1.0.290 → 1.0.292

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.
@@ -94,6 +94,12 @@ export default function money(val, kilo, currency, novalue, decimal, thousands,
94
94
  if (isNaN(val) || !val) {
95
95
  return 0 + (currency ? ' ' + currency : '');
96
96
  }
97
+ if (typeof val === 'string') {
98
+ val = Number(val);
99
+ }
100
+ if (typeof val !== 'number') {
101
+ throw new Error('The value must be a number');
102
+ }
97
103
  if (kilo && val) {
98
104
  val = val / 1000;
99
105
  if (currency) {
@@ -1 +1 @@
1
- export default function createObject(...args: any[]): any;
1
+ export default function createObject(...originalArgs: any[]): any;
@@ -1,21 +1,15 @@
1
- var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
2
- if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
3
- if (ar || !(i in from)) {
4
- if (!ar) ar = Array.prototype.slice.call(from, 0, i);
5
- ar[i] = from[i];
6
- }
7
- }
8
- return to.concat(ar || Array.prototype.slice.call(from));
9
- };
10
1
  import extend from './extend.js';
2
+ // Args because of typescript doing errors
11
3
  export default function createObject() {
12
- var args = [];
4
+ var originalArgs = [];
13
5
  for (var _i = 0; _i < arguments.length; _i++) {
14
- args[_i] = arguments[_i];
6
+ originalArgs[_i] = arguments[_i];
15
7
  }
8
+ var args = Array.from(arguments);
16
9
  var obj = Object.create(null);
17
10
  if (args.length) {
18
- extend.apply(void 0, __spreadArray([obj], args, false));
11
+ args.unshift(obj);
12
+ extend.apply(obj, args);
19
13
  }
20
14
  return obj;
21
15
  }
@@ -24,7 +24,7 @@ export default function isObject() {
24
24
  return false;
25
25
  for (var _a = 0, args_1 = args; _a < args_1.length; _a++) {
26
26
  var a = args_1[_a];
27
- if ({}.toString.apply(a) !== "[object Object]") {
27
+ if ({}.toString.apply(a).substr(0, 7) !== "[object") {
28
28
  return false;
29
29
  }
30
30
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bbn/bbn",
3
- "version": "1.0.290",
3
+ "version": "1.0.292",
4
4
  "description": "Javascript toolkit",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -24,30 +24,30 @@
24
24
  "author": "Thomas Nabet <thomas.nabet@gmail.com>",
25
25
  "license": "MIT",
26
26
  "devDependencies": {
27
- "chai": "^4.3.10",
28
- "jsdom": "22.1.0",
27
+ "chai": "^5.1.2",
28
+ "jsdom": "26.0.0",
29
29
  "jsdom-global": "3.0.2",
30
- "mocha": "^10.2.0",
31
- "ts-loader": "^9.5.0",
32
- "typescript": "^5.4.5",
33
- "webpack": "^5.88.2",
34
- "webpack-cli": "^5.1.4"
30
+ "mocha": "^11.0.1",
31
+ "ts-loader": "^9.5.2",
32
+ "typescript": "^5.7.3",
33
+ "webpack": "^5.97.1",
34
+ "webpack-cli": "^6.0.1"
35
35
  },
36
36
  "bugs": {
37
37
  "url": "https://github.com/nabab/bbn-js/issues"
38
38
  },
39
39
  "homepage": "https://github.com/nabab/bbn-js#readme",
40
40
  "dependencies": {
41
- "@rollup/plugin-commonjs": "^25.0.7",
41
+ "@rollup/plugin-commonjs": "^28.0.2",
42
42
  "@rollup/plugin-json": "^6.1.0",
43
- "@rollup/plugin-node-resolve": "^15.2.3",
44
- "@rollup/plugin-replace": "^5.0.5",
43
+ "@rollup/plugin-node-resolve": "^16.0.0",
44
+ "@rollup/plugin-replace": "^6.0.2",
45
45
  "@rollup/plugin-terser": "^0.4.4",
46
- "@rollup/plugin-typescript": "^11.1.6",
47
- "axios": "^1.5.1",
48
- "dayjs": "^1.11.10",
49
- "rollup": "^4.16.2",
50
- "tslib": "^2.6.2"
46
+ "@rollup/plugin-typescript": "^12.1.2",
47
+ "axios": "^1.7.9",
48
+ "dayjs": "^1.11.13",
49
+ "rollup": "^4.30.1",
50
+ "tslib": "^2.8.1"
51
51
  },
52
52
  "directories": {
53
53
  "doc": "doc",