- Some deflexing of the low-level narya stuff. More to come, as we're
going to want the minimum client to be flex-free. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4507 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -6,6 +6,26 @@ import com.threerings.util.StringBuilder;
|
||||
|
||||
public class Util
|
||||
{
|
||||
/**
|
||||
* Is the specified object 'simple': one of the basic built-in flash types.
|
||||
*/
|
||||
public static function isSimple (obj :Object) :Boolean
|
||||
{
|
||||
var type :String = typeof(obj);
|
||||
switch (type) {
|
||||
case "number":
|
||||
case "string":
|
||||
case "boolean":
|
||||
return true;
|
||||
|
||||
case "object":
|
||||
return (obj is Date) || (obj is Array);
|
||||
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* A nice utility method for testing equality in a better way.
|
||||
* If the objects are Equalable, then that will be tested. Arrays
|
||||
|
||||
Reference in New Issue
Block a user