Conversation
It is available since Node.js 0.10: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/isArray#browser_compatibility The library just re-exports Array.isArray if it's available: https://github.com/isaacs/core-util-is/blob/b90f777c19e0ca1304c2e1c48949b61779d70f1b/lib/util.js#L25-L31
isFunction is just an alias for that: https://github.com/isaacs/core-util-is/blob/b90f777c19e0ca1304c2e1c48949b61779d70f1b/lib/util.js#L88-L91
isObject also doesn't only check whether it's an object, but whether it is also !== null. Ref: https://github.com/isaacs/core-util-is/blob/b90f777c19e0ca1304c2e1c48949b61779d70f1b/lib/util.js#L73-L76
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #60 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 5 5
Lines 486 484 -2
=========================================
- Hits 486 484 -2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Mostly replaces them with their body or modern replacement (Array.isArray or typeof).
This also opens the ability to use comment-json inside the browser (core-utils-is depended on node:buffer, which is unavailable in browsers).