Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add check is object for each item in data #1

Open
mephistorine opened this issue May 5, 2021 · 0 comments
Open

Add check is object for each item in data #1

mephistorine opened this issue May 5, 2021 · 0 comments
Assignees
Labels
bug Something isn't working good first issue Good for newcomers target: patch This PR is targeted for the next patch release
Milestone

Comments

@mephistorine
Copy link
Owner

Now if some item of data not object, something went wrong.

Below code of function checks object or not item:

/**
 * Checks some is object
 *
 * @param some Something to check
 * @returns TRUE if it object, FALSE otherwise
 */
export function isObject<T>(some: T): some is T {
  return Object.prototype.toString.call(some) === '[object Object]'
}
@mephistorine mephistorine added the bug Something isn't working label May 5, 2021
@mephistorine mephistorine self-assigned this May 5, 2021
@mephistorine mephistorine added target: patch This PR is targeted for the next patch release good first issue Good for newcomers labels May 5, 2021
@mephistorine mephistorine added this to the v1.0.0 milestone May 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers target: patch This PR is targeted for the next patch release
Projects
None yet
Development

No branches or pull requests

1 participant