Skip to content

Commit

Permalink
v0.2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
pedronauck committed Mar 31, 2018
1 parent a33fd43 commit b9a6aa6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-adopt",
"version": "0.2.0",
"version": "0.2.1",
"main": "dist/index.js",
"umd:main": "dist/index.umd.js",
"module": "dist/index.m.js",
Expand Down
4 changes: 2 additions & 2 deletions src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ export type RPC<RenderProps, Props = {}> = ComponentType<
}
>

const isFn = (val: any): boolean => Boolean(val) && typeof val === 'function'

function omit<R = object>(obj: any, omitProps: string[]): R {
const newObj = keys(obj)
.filter((key: string): boolean => omitProps.indexOf(key) === -1)
Expand All @@ -33,6 +31,8 @@ function omit<R = object>(obj: any, omitProps: string[]): R {
return newObj as R
}

const isFn = (val: any): boolean => Boolean(val) && typeof val === 'function'

const isValidRenderProp = (prop: ReactNode | ChildrenFn<any>): boolean =>
React.isValidElement(prop) || isFn(prop)

Expand Down

0 comments on commit b9a6aa6

Please sign in to comment.