@bbn/bbn 1.0.355 → 1.0.356

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.
@@ -1,7 +1,7 @@
1
1
  import isDate from '../type/isDate.js';
2
2
  import createObject from './createObject.js';
3
3
  import isFunction from '../type/isFunction.js';
4
- import isValue from '../type/isValue.js';
4
+ import isNotObject from '../type/isNotObject.js';
5
5
  import isDom from '../type/isDom.js';
6
6
  import numProperties from './numProperties.js';
7
7
  var diffObjProcessed = [];
@@ -108,7 +108,7 @@ export default function diffObj(obj1, obj2, unchanged, notRoot) {
108
108
  }
109
109
  var diff = createObject();
110
110
  if (!isFunction(obj1) && !isFunction(obj2)) {
111
- if (isValue(obj1) || isValue(obj2)) {
111
+ if (isNotObject(obj1) || isNotObject(obj2)) {
112
112
  var res = _compareValues(obj1, obj2);
113
113
  if (unchanged || res !== VALUE_UNCHANGED) {
114
114
  var ret = createObject();
@@ -1,25 +1,25 @@
1
1
  /**
2
2
  * Returns true if the given argument is not null or type object or array.
3
- * @method isValue
3
+ * @method isNotObject
4
4
  * @deprecated
5
5
  * @see bbn.fn.isPrimitive
6
6
  * @example
7
7
  * ```javascript
8
- * bbn.fn.isValue('myString');
8
+ * bbn.fn.isNotObject('myString');
9
9
  * //true
10
10
  * ```
11
11
  * @example
12
12
  * ```javascript
13
- * bbn.fn.isValue(6);
13
+ * bbn.fn.isNotObject(6);
14
14
  * //true
15
15
  * ```
16
16
  * @example
17
17
  * ```javascript
18
- * bbn.fn.isValue([80,10,22]);
18
+ * bbn.fn.isNotObject([80,10,22]);
19
19
  * //false
20
20
  * ```
21
21
  * @global
22
22
  * @memberof bbn.fn
23
23
  * @returns {Boolean}
24
24
  */
25
- export default function isValue(...args: any[]): boolean;
25
+ export default function isNotObject(...args: any[]): boolean;
@@ -1,29 +1,29 @@
1
1
  import isNull from './isNull.js';
2
2
  /**
3
3
  * Returns true if the given argument is not null or type object or array.
4
- * @method isValue
4
+ * @method isNotObject
5
5
  * @deprecated
6
6
  * @see bbn.fn.isPrimitive
7
7
  * @example
8
8
  * ```javascript
9
- * bbn.fn.isValue('myString');
9
+ * bbn.fn.isNotObject('myString');
10
10
  * //true
11
11
  * ```
12
12
  * @example
13
13
  * ```javascript
14
- * bbn.fn.isValue(6);
14
+ * bbn.fn.isNotObject(6);
15
15
  * //true
16
16
  * ```
17
17
  * @example
18
18
  * ```javascript
19
- * bbn.fn.isValue([80,10,22]);
19
+ * bbn.fn.isNotObject([80,10,22]);
20
20
  * //false
21
21
  * ```
22
22
  * @global
23
23
  * @memberof bbn.fn
24
24
  * @returns {Boolean}
25
25
  */
26
- export default function isValue() {
26
+ export default function isNotObject() {
27
27
  var args = [];
28
28
  for (var _i = 0; _i < arguments.length; _i++) {
29
29
  args[_i] = arguments[_i];
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Returns true if the given argument is array.
3
+ * @method isArray
4
+ * @global
5
+ * @example
6
+ * ```javascript
7
+ * bbn.fn.isArray([5,2,6]);
8
+ * //true
9
+ * ```
10
+ * @memberof bbn.fn
11
+ * @returns {Boolean}
12
+ */
13
+ export default function isUid(...args: any[]): boolean;
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Returns true if the given argument is array.
3
+ * @method isArray
4
+ * @global
5
+ * @example
6
+ * ```javascript
7
+ * bbn.fn.isArray([5,2,6]);
8
+ * //true
9
+ * ```
10
+ * @memberof bbn.fn
11
+ * @returns {Boolean}
12
+ */
13
+ export default function isUid() {
14
+ var args = [];
15
+ for (var _i = 0; _i < arguments.length; _i++) {
16
+ args[_i] = arguments[_i];
17
+ }
18
+ if (!args.length)
19
+ return false;
20
+ for (var _a = 0, args_1 = args; _a < args_1.length; _a++) {
21
+ var a = args_1[_a];
22
+ if ((typeof a !== 'string') || !a.match(/^[0-9a-f]{32}$/i)) {
23
+ return false;
24
+ }
25
+ }
26
+ return true;
27
+ }
28
+ ;
package/dist/fn.d.ts CHANGED
@@ -159,10 +159,11 @@ import isSQLDate from './fn/type/isSQLDate.js';
159
159
  import isString from './fn/type/isString.js';
160
160
  import isSymbol from './fn/type/isSymbol.js';
161
161
  import isTabletDevice from './fn/browser/isTabletDevice.js';
162
+ import isUid from './fn/type/isUid.js';
162
163
  import isURL from './fn/type/isURL.js';
163
164
  import isValidDimension from './fn/type/isValidDimension.js';
164
165
  import isValidName from './fn/type/isValidName.js';
165
- import isValue from './fn/type/isValue.js';
166
+ import isNotObject from './fn/type/isNotObject.js';
166
167
  import isVue from './fn/type/isVue.js';
167
168
  import isWritable from './fn/object/isWritable.js';
168
169
  import iterate from './fn/loop/iterate.js';
@@ -401,9 +402,10 @@ declare const _default: {
401
402
  isSymbol: typeof isSymbol;
402
403
  isTabletDevice: typeof isTabletDevice;
403
404
  isURL: typeof isURL;
405
+ isUid: typeof isUid;
404
406
  isValidDimension: typeof isValidDimension;
405
407
  isValidName: typeof isValidName;
406
- isValue: typeof isValue;
408
+ isNotObject: typeof isNotObject;
407
409
  isVue: typeof isVue;
408
410
  isWritable: typeof isWritable;
409
411
  iterate: typeof iterate;
package/dist/fn.js CHANGED
@@ -159,10 +159,11 @@ import isSQLDate from './fn/type/isSQLDate.js';
159
159
  import isString from './fn/type/isString.js';
160
160
  import isSymbol from './fn/type/isSymbol.js';
161
161
  import isTabletDevice from './fn/browser/isTabletDevice.js';
162
+ import isUid from './fn/type/isUid.js';
162
163
  import isURL from './fn/type/isURL.js';
163
164
  import isValidDimension from './fn/type/isValidDimension.js';
164
165
  import isValidName from './fn/type/isValidName.js';
165
- import isValue from './fn/type/isValue.js';
166
+ import isNotObject from './fn/type/isNotObject.js';
166
167
  import isVue from './fn/type/isVue.js';
167
168
  import isWritable from './fn/object/isWritable.js';
168
169
  import iterate from './fn/loop/iterate.js';
@@ -401,9 +402,10 @@ export default {
401
402
  isSymbol: isSymbol,
402
403
  isTabletDevice: isTabletDevice,
403
404
  isURL: isURL,
405
+ isUid: isUid,
404
406
  isValidDimension: isValidDimension,
405
407
  isValidName: isValidName,
406
- isValue: isValue,
408
+ isNotObject: isNotObject,
407
409
  isVue: isVue,
408
410
  isWritable: isWritable,
409
411
  iterate: iterate,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bbn/bbn",
3
- "version": "1.0.355",
3
+ "version": "1.0.356",
4
4
  "description": "Javascript toolkit",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",