sindresorhus / is

Type check values
MIT License
1.68k stars 109 forks source link

is.function and is.class #114

Closed jsneko closed 3 years ago

jsneko commented 4 years ago

When attempting to use is.function and / or is.class I am getting a x is not a function error. I then noticed that those two methods / functions had underscores (_) appended to their name.

Is that to mean that we should no longer be using them? If not, should the README be changed to reflect their name change?

sindresorhus commented 4 years ago

Are you using TypeScript or plain JavaScript? They should only have underscore appended in TS to work around those words being reserved there.

jsneko commented 4 years ago

Plain JavaScript.

brandon93s commented 3 years ago

@jsneko please provide the version you're using and a code snippet if this is still an issue. Source below shows where is.function and is.class should be available to plain JS:

https://github.com/sindresorhus/is/blob/d528545e02de3396ea900cd93af478292f0697ee/source/index.ts#L629-L650