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

@byjohann/utils

Package Overview
Dependencies
Maintainers
0
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@byjohann/utils - npm Package Compare versions

Comparing version 0.1.1 to 0.1.2

10

dist/index.d.ts
type MaybeArray<T> = T | T[];
/**
* Converts `MaybeArray<T>` to `Array<T>`
* Converts `MaybeArray<T>` to `Array<T>`.
*/

@@ -17,10 +17,14 @@ declare function toArray<T>(array?: MaybeArray<T> | null | undefined): T[];

/**
* Type-safe wrapper around `JSON.stringify` falling back to the original value
* if it is not a string or an error is thrown.
*/
declare function tryParseJson<T = unknown>(value: unknown): T;
/**
* Strictly typed `Object.keys`
* Strictly typed `Object.keys`.
*/
declare function objectKeys<T extends object>(obj: T): Array<`${keyof T & (string | number | boolean | null | undefined)}`>;
/**
* Strictly typed `Object.entries`
* Strictly typed `Object.entries`.
*/

@@ -27,0 +31,0 @@ declare function objectEntries<T extends object>(obj: T): Array<[keyof T, T[keyof T]]>;

{
"name": "@byjohann/utils",
"type": "module",
"version": "0.1.1",
"version": "0.1.2",
"packageManager": "pnpm@9.5.0",

@@ -6,0 +6,0 @@ "description": "A collection of utilities for my projects",

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