Skip to content

Commit 7fda27a

Browse files
authored
Export isPlainObject (#795)
1 parent bbb455e commit 7fda27a

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

etc/redux-toolkit.api.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,9 @@ export function isImmutableDefault(value: unknown): boolean;
301301
// @public
302302
export function isPlain(val: any): boolean;
303303

304+
// @public
305+
export function isPlainObject(value: unknown): value is object;
306+
304307
// @public (undocumented)
305308
export class MiddlewareArray<Middlewares extends Middleware<any, any>> extends Array<Middlewares> {
306309
// (undocumented)

src/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,3 +107,5 @@ export {
107107
} from './createAsyncThunk'
108108

109109
export { nanoid } from './nanoid'
110+
111+
export { default as isPlainObject } from './isPlainObject'

src/isPlainObject.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
*
66
* @param {any} value The value to inspect.
77
* @returns {boolean} True if the argument appears to be a plain object.
8+
*
9+
* @public
810
*/
911
export default function isPlainObject(value: unknown): value is object {
1012
if (typeof value !== 'object' || value === null) return false

0 commit comments

Comments
 (0)