Skip to content

Commit

Permalink
chore: update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
mesqueeb committed Dec 1, 2022
1 parent 4152a01 commit 3c550db
Show file tree
Hide file tree
Showing 5 changed files with 1,629 additions and 1,291 deletions.
5 changes: 2 additions & 3 deletions dist/index.cjs
@@ -1,7 +1,5 @@
'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

/**
* Returns the object type of the given payload
*
Expand Down Expand Up @@ -38,7 +36,8 @@ function isNull(payload) {
function isPlainObject(payload) {
if (getType(payload) !== 'Object')
return false;
return payload.constructor === Object && Object.getPrototypeOf(payload) === Object.prototype;
const prototype = Object.getPrototypeOf(payload);
return prototype.constructor === Object && prototype === Object.prototype;
}
/**
* Returns whether the payload is a plain JavaScript object (excluding special classes or objects with other prototypes)
Expand Down
3 changes: 2 additions & 1 deletion dist/index.es.js
Expand Up @@ -34,7 +34,8 @@ function isNull(payload) {
function isPlainObject(payload) {
if (getType(payload) !== 'Object')
return false;
return payload.constructor === Object && Object.getPrototypeOf(payload) === Object.prototype;
const prototype = Object.getPrototypeOf(payload);
return prototype.constructor === Object && prototype === Object.prototype;
}
/**
* Returns whether the payload is a plain JavaScript object (excluding special classes or objects with other prototypes)
Expand Down
10 changes: 5 additions & 5 deletions dist/types/index.d.ts
@@ -1,8 +1,8 @@
export declare type AnyFunction = (...args: any[]) => any;
export declare type AnyAsyncFunction = (...args: any[]) => Promise<any>;
export declare type AnyClass = new (...args: any[]) => any;
export declare type PlainObject = Record<string | number | symbol, any>;
declare type TypeGuard<A, B extends A> = (payload: A) => payload is B;
export type AnyFunction = (...args: any[]) => any;
export type AnyAsyncFunction = (...args: any[]) => Promise<any>;
export type AnyClass = new (...args: any[]) => any;
export type PlainObject = Record<string | number | symbol, any>;
type TypeGuard<A, B extends A> = (payload: A) => payload is B;
/**
* Returns the object type of the given payload
*
Expand Down

0 comments on commit 3c550db

Please sign in to comment.