Socket
Socket
Sign inDemoInstall

@metamask/utils

Package Overview
Dependencies
Maintainers
8
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@metamask/utils - npm Package Compare versions

Comparing version 3.4.1 to 3.5.0

11

dist/misc.d.ts

@@ -25,6 +25,5 @@ /**

/**
* A JavaScript object that is not `null`, a function, or an array. The object
* can still be an instance of a class.
* A JavaScript object that is not `null`, a function, or an array.
*/
export declare type RuntimeObject = Record<number | string | symbol, unknown>;
export declare type RuntimeObject = Record<PropertyKey, unknown>;
/**

@@ -54,5 +53,5 @@ * A {@link NonEmptyArray} type guard.

/**
* An alias for {@link Object.hasOwnProperty}.
* A type guard for ensuring an object has a property.
*
* @param object - The object to check.
* @param objectToCheck - The object to check.
* @param name - The property name to check for.

@@ -62,3 +61,3 @@ * @returns Whether the specified object has an own property with the specified

*/
export declare const hasProperty: (object: RuntimeObject, name: string | number | symbol) => boolean;
export declare const hasProperty: <ObjectToCheck extends Object, Property extends PropertyKey>(objectToCheck: ObjectToCheck, name: Property) => objectToCheck is ObjectToCheck & Record<Property, unknown>;
export declare type PlainObject = Record<number | string | symbol, unknown>;

@@ -65,0 +64,0 @@ /**

@@ -46,5 +46,5 @@ "use strict";

/**
* An alias for {@link Object.hasOwnProperty}.
* A type guard for ensuring an object has a property.
*
* @param object - The object to check.
* @param objectToCheck - The object to check.
* @param name - The property name to check for.

@@ -54,3 +54,3 @@ * @returns Whether the specified object has an own property with the specified

*/
const hasProperty = (object, name) => Object.hasOwnProperty.call(object, name);
const hasProperty = (objectToCheck, name) => Object.hasOwnProperty.call(objectToCheck, name);
exports.hasProperty = hasProperty;

@@ -57,0 +57,0 @@ /**

{
"name": "@metamask/utils",
"version": "3.4.1",
"version": "3.5.0",
"description": "Various JavaScript/TypeScript utilities of wide relevance to the MetaMask codebase.",

@@ -5,0 +5,0 @@ "repository": {

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