@nestjs/common 8.2.4 → 8.2.5

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/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  (The MIT License)
2
2
 
3
- Copyright (c) 2017-2021 Kamil Mysliwiec <https://kamilmysliwiec.com>
3
+ Copyright (c) 2017-2022 Kamil Mysliwiec <https://kamilmysliwiec.com>
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining
6
6
  a copy of this software and associated documentation files (the
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nestjs/common",
3
- "version": "8.2.4",
3
+ "version": "8.2.5",
4
4
  "description": "Nest - modern, fast, powerful node.js web framework (@common)",
5
5
  "author": "Kamil Mysliwiec",
6
6
  "homepage": "https://nestjs.com",
@@ -17,7 +17,7 @@ let DefaultValuePipe = class DefaultValuePipe {
17
17
  }
18
18
  transform(value, _metadata) {
19
19
  if (shared_utils_1.isNil(value) ||
20
- (typeof value === 'number' && isNaN(value))) {
20
+ (shared_utils_1.isNumber(value) && isNaN(value))) {
21
21
  return this.defaultValue;
22
22
  }
23
23
  return value;
@@ -9,9 +9,10 @@ export declare const addLeadingSlash: (path?: string) => string;
9
9
  export declare const validatePath: (path?: string) => string;
10
10
  export declare const normalizePath: (path?: string) => string;
11
11
  export declare const stripEndSlash: (path: string) => string;
12
- export declare const isFunction: (fn: any) => boolean;
13
- export declare const isString: (fn: any) => fn is string;
14
- export declare const isConstructor: (fn: any) => boolean;
15
- export declare const isNil: (obj: any) => obj is null;
12
+ export declare const isFunction: (val: any) => boolean;
13
+ export declare const isString: (val: any) => val is string;
14
+ export declare const isNumber: (val: any) => val is number;
15
+ export declare const isConstructor: (val: any) => boolean;
16
+ export declare const isNil: (val: any) => val is null;
16
17
  export declare const isEmpty: (array: any) => boolean;
17
- export declare const isSymbol: (fn: any) => fn is symbol;
18
+ export declare const isSymbol: (val: any) => val is symbol;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isSymbol = exports.isEmpty = exports.isNil = exports.isConstructor = exports.isString = exports.isFunction = exports.stripEndSlash = exports.normalizePath = exports.validatePath = exports.addLeadingSlash = exports.isPlainObject = exports.isObject = exports.isUndefined = void 0;
3
+ exports.isSymbol = exports.isEmpty = exports.isNil = exports.isConstructor = exports.isNumber = exports.isString = exports.isFunction = exports.stripEndSlash = exports.normalizePath = exports.validatePath = exports.addLeadingSlash = exports.isPlainObject = exports.isObject = exports.isUndefined = void 0;
4
4
  /* eslint-disable @typescript-eslint/no-use-before-define */
5
5
  const isUndefined = (obj) => typeof obj === 'undefined';
6
6
  exports.isUndefined = isUndefined;
@@ -41,15 +41,17 @@ const normalizePath = (path) => path
41
41
  exports.normalizePath = normalizePath;
42
42
  const stripEndSlash = (path) => path[path.length - 1] === '/' ? path.slice(0, path.length - 1) : path;
43
43
  exports.stripEndSlash = stripEndSlash;
44
- const isFunction = (fn) => typeof fn === 'function';
44
+ const isFunction = (val) => typeof val === 'function';
45
45
  exports.isFunction = isFunction;
46
- const isString = (fn) => typeof fn === 'string';
46
+ const isString = (val) => typeof val === 'string';
47
47
  exports.isString = isString;
48
- const isConstructor = (fn) => fn === 'constructor';
48
+ const isNumber = (val) => typeof val === 'number';
49
+ exports.isNumber = isNumber;
50
+ const isConstructor = (val) => val === 'constructor';
49
51
  exports.isConstructor = isConstructor;
50
- const isNil = (obj) => exports.isUndefined(obj) || obj === null;
52
+ const isNil = (val) => exports.isUndefined(val) || val === null;
51
53
  exports.isNil = isNil;
52
54
  const isEmpty = (array) => !(array && array.length > 0);
53
55
  exports.isEmpty = isEmpty;
54
- const isSymbol = (fn) => typeof fn === 'symbol';
56
+ const isSymbol = (val) => typeof val === 'symbol';
55
57
  exports.isSymbol = isSymbol;