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

utilium

Package Overview
Dependencies
Maintainers
1
Versions
69
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

utilium - npm Package Compare versions

Comparing version 0.1.2 to 0.1.3

2

dist/objects.d.ts
/// <reference types="node" resolution-mode="require"/>
import type * as FS from 'fs';
export declare function filterObject<T extends object, K extends keyof T>(object: T, ...keys: K[]): Omit<T, K>;
export declare function filterObject<T extends object, K extends keyof T>(object: T, ...keys: K[]): Pick<T, K>;
export declare function isJSON(str: string): boolean;

@@ -5,0 +5,0 @@ export declare abstract class FileMap<V> implements Map<string, V> {

{
"name": "utilium",
"version": "0.1.2",
"version": "0.1.3",
"description": "Typescript utilies",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

import type * as FS from 'fs';
export function filterObject<T extends object, K extends keyof T>(object: T, ...keys: K[]): Omit<T, K> {
export function filterObject<T extends object, K extends keyof T>(object: T, ...keys: K[]): Pick<T, K> {
const entries = <[K, T[K]][]>Object.entries(object);
return <Omit<T, K>>(<unknown>Object.fromEntries(entries.filter(([key]) => keys.includes(key))));
return <Pick<T, K>>Object.fromEntries(entries.filter(([key]) => keys.includes(key)));
}

@@ -7,0 +7,0 @@

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