Skip to content

Commit

Permalink
Export isPlainObject
Browse files Browse the repository at this point in the history
  • Loading branch information
msutkowski committed Nov 7, 2020
1 parent bbb455e commit 2c869f4
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions etc/redux-toolkit.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,9 @@ export function isImmutableDefault(value: unknown): boolean;
// @public
export function isPlain(val: any): boolean;

// @public
export function isPlainObject(value: unknown): value is object;

// @public (undocumented)
export class MiddlewareArray<Middlewares extends Middleware<any, any>> extends Array<Middlewares> {
// (undocumented)
Expand Down
2 changes: 2 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,3 +107,5 @@ export {
} from './createAsyncThunk'

export { nanoid } from './nanoid'

export { default as isPlainObject } from './isPlainObject'
2 changes: 2 additions & 0 deletions src/isPlainObject.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
*
* @param {any} value The value to inspect.
* @returns {boolean} True if the argument appears to be a plain object.
*
* @public
*/
export default function isPlainObject(value: unknown): value is object {
if (typeof value !== 'object' || value === null) return false
Expand Down

0 comments on commit 2c869f4

Please sign in to comment.