0.2.0 • Published 11 years ago

sniff v0.2.0

Weekly downloads
17
License
-
Repository
github
Last release
11 years ago

sniff

This is a simple wrapper to Angus Croll's typeOf function defined in his article Fixing the Javascript typeof operator.

Additionally, it includes a subsequent test to determine whether a function is a functional prototype, and therefore something that would be suitable for calling with the new operator. A value of prototype is returned from the function in event that:

  • the target has been detected as a function through Angus's previous logic
  • the prototype of the function has some keys defined on it. While this is not a conclusive test (suggestions definitely welcome) I think it covers most of the cases where people are using JS prototypes in their code.

As always, feedback would be greatly appreciated.

0.2.0

11 years ago

0.1.3

12 years ago

0.1.2

12 years ago

0.1.1

12 years ago

0.1.0

12 years ago

0.0.1

12 years ago