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

@xylabs/promise

Package Overview
Dependencies
Maintainers
0
Versions
215
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@xylabs/promise - npm Package Compare versions

Comparing version 3.6.7 to 3.6.8

8

package.json

@@ -39,5 +39,5 @@ {

"devDependencies": {
"@xylabs/ts-scripts-yarn3": "^3.15.4",
"@xylabs/tsconfig": "^3.15.4",
"@xylabs/tsconfig-jest": "^3.15.4",
"@xylabs/ts-scripts-yarn3": "^3.15.5",
"@xylabs/tsconfig": "^3.15.5",
"@xylabs/tsconfig-jest": "^3.15.5",
"typescript": "^5.5.4"

@@ -56,4 +56,4 @@ },

"sideEffects": false,
"version": "3.6.7",
"version": "3.6.8",
"type": "module"
}

@@ -18,7 +18,7 @@ export type FieldType = 'string' | 'number' | 'object' | 'symbol' | 'symbol' | 'undefined' | 'null' | 'array' | 'function'

case 'object': {
//nulls resolve to objects, so exclude them
// nulls resolve to objects, so exclude them
if (value === null) {
return false
}
//arrays resolve to objects, so exclude them
// arrays resolve to objects, so exclude them
return typeofValue === 'object' && !Array.isArray(value)

@@ -25,0 +25,0 @@ }

import { isType } from './isType.ts'
// eslint-disable-next-line @typescript-eslint/ban-types
// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type
export type TypedValue = bigint | string | number | boolean | null | TypedObject | TypedArray | Function | symbol | undefined

@@ -37,3 +37,3 @@ export type TypedKey<T extends string | void = void> = T extends string ? T : string | number | symbol

export const isTypedArray = (value: unknown): value is TypedArray => {
return Array.isArray(value) && !value.some((item) => !isTypedValue(item))
return Array.isArray(value) && !value.some(item => !isTypedValue(item))
}

@@ -48,9 +48,9 @@

return (
isType(value, 'object') &&
//check if all keys are strings
!Object.entries(value as object).some((item) => !isValidTypedFieldPair(item))
isType(value, 'object')
// check if all keys are strings
&& !Object.entries(value as object).some(item => !isValidTypedFieldPair(item))
)
}
//Object Type Test
// Object Type Test
/*

@@ -57,0 +57,0 @@ interface TestObject {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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