| 128 | | isFunction: function(object) { |
|---|
| 129 | | return typeof object == "function"; |
|---|
| 130 | | }, |
|---|
| 131 | | |
|---|
| 132 | | isString: function(object) { |
|---|
| 133 | | return typeof object == "string"; |
|---|
| 134 | | }, |
|---|
| 135 | | |
|---|
| 136 | | isNumber: function(object) { |
|---|
| 137 | | return typeof object == "number"; |
|---|
| 138 | | }, |
|---|
| 139 | | |
|---|
| 140 | | isUndefined: function(object) { |
|---|
| 141 | | return typeof object == "undefined"; |
|---|
| 142 | | } |
|---|
| | 128 | $w('function string number undefined').each(function(type){ |
|---|
| | 129 | Object['is' + type.capitalize()] = function(object) { |
|---|
| | 130 | return typeof object == type; |
|---|
| | 131 | } |
|---|
| | 132 | }) |
|---|