Socket
Socket
Sign inDemoInstall

@antfu/utils

Package Overview
Dependencies
Maintainers
1
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@antfu/utils - npm Package Compare versions

Comparing version 0.1.2 to 0.1.3

2

dist/index.d.ts

@@ -216,3 +216,3 @@ /**

*/
declare function objectPick<O, T extends keyof O>(obj: O, keys: T[]): Pick<O, T>;
declare function objectPick<O, T extends keyof O>(obj: O, keys: T[], omitUndefined?: boolean): Pick<O, T>;

@@ -219,0 +219,0 @@ interface SingletonPromiseReturn<T> {

@@ -154,5 +154,8 @@ "use strict";Object.defineProperty(exports, "__esModule", {value: true});// src/array.ts

}
function objectPick(obj, keys) {
function objectPick(obj, keys, omitUndefined = false) {
return keys.reduce((n, k) => {
n[k] = obj[k];
if (k in obj) {
if (!omitUndefined || !obj[k] === void 0)
n[k] = obj[k];
}
return n;

@@ -159,0 +162,0 @@ }, {});

{
"name": "@antfu/utils",
"version": "0.1.2",
"version": "0.1.3",
"description": "Opinionated collection of common JavaScript / TypeScript utils by @antfu",

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

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