Bug Tracker

Modify

Ticket #11160 (closed feature: worksforme)

Opened 16 months ago

Last modified 16 months ago

Function to get object type

Reported by: Daved <DavedArtemik@…> Owned by:
Priority: undecided Milestone: None
Component: unfiled Version: 1.7.1
Keywords: Cc:
Blocking: Blocked by:

Description

Currently, there is no built in method to detect the type of object being used if it is created using a constructor. Using "typeof" on an object defined using "new Array()" yields "object" as a result without revealing what type of "object" you are working with. It would be useful to have a built-in function to determine the type of object.

Referring to the fiddle:  http://jsfiddle.net/CheapSk8/3uUVT/, using the object constructor, you can determine the type of object passed in.

Change History

comment:1 Changed 16 months ago by dmethvin

  • Status changed from new to closed
  • Resolution set to worksforme

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.