Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@operato/utils

Package Overview
Dependencies
Maintainers
6
Versions
194
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@operato/utils - npm Package Compare versions

Comparing version 1.11.13 to 1.12.7

9

CHANGELOG.md

@@ -6,2 +6,11 @@ # Change Log

### [1.12.7](https://github.com/hatiolab/operato/compare/v1.12.6...v1.12.7) (2024-01-03)
### :bug: Bug Fix
* 그리드 숫자 판단 수정 ([f15fdbe](https://github.com/hatiolab/operato/commit/f15fdbe5d4331050d8250cf7611a0dca4b79b239))
### [1.11.13](https://github.com/hatiolab/operato/compare/v1.11.12...v1.11.13) (2023-12-20)

@@ -8,0 +17,0 @@

2

dist/src/checker.d.ts

@@ -1,1 +0,1 @@

export declare function checkStrictNumber(value: any): boolean;
export declare function parseToNumberOrNull(value: any): number | null;

@@ -1,2 +0,4 @@

// 공백, 널, 불린 값을 제외하고 숫자인지 판단
// 숫자라면 숫자값을, 아니면 null을 반환
// 0 = true
// '0' = true
// 123 = true

@@ -13,9 +15,10 @@ // "123" = true

// [] = false
export function checkStrictNumber(value) {
const type = typeof value;
if (value === null || value === undefined || value === '' || type === 'boolean' || type === 'object') {
return false;
export function parseToNumberOrNull(value) {
let result = null;
// 숫자나 스트링이면서 NaN이 아니면 숫자로 변환
if ((typeof value === 'string' || typeof value === 'number') && value !== '' && !isNaN(value)) {
result = Number(value);
}
return !isNaN(Number(value));
return result;
}
//# sourceMappingURL=checker.js.map

@@ -5,3 +5,3 @@ {

"author": "heartyoh",
"version": "1.11.13",
"version": "1.12.7",
"main": "dist/src/index.js",

@@ -121,3 +121,3 @@ "module": "dist/src/index.js",

},
"gitHead": "0af53828fbce09a9156cfa0728c934f34dfe527f"
"gitHead": "6c27ff0f4f70f5afd872d2ee6a5f05cdd974aa67"
}

@@ -1,2 +0,4 @@

// 공백, 널, 불린 값을 제외하고 숫자인지 판단
// 숫자라면 숫자값을, 아니면 null을 반환
// 0 = true
// '0' = true
// 123 = true

@@ -13,9 +15,11 @@ // "123" = true

// [] = false
export function checkStrictNumber(value: any): boolean {
const type = typeof value
if (value === null || value === undefined || value === '' || type === 'boolean' || type === 'object') {
return false
export function parseToNumberOrNull(value: any): number | null {
let result: number | null = null
// 숫자나 스트링이면서 NaN이 아니면 숫자로 변환
if ((typeof value === 'string' || typeof value === 'number') && value !== '' && !isNaN(value as number)) {
result = Number(value)
}
return !isNaN(Number(value))
return result
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc