View source

class thx.DynamicsT

import thx.Dynamics;

Available on all platforms

Class Fields

static inline function exists<T>(o:DynamicT, name:String):Bool

exists returns true if o contains a field named name.

static inline function fields<T>(o:DynamicT):Array<String>

fields returns an array of string containing the field names of the argument object.

static inline function isEmpty<T>(o:DynamicT):Bool

isEmpty returns true if the object doesn't have any field.

static function merge<T>(to:DynamicT, from:DynamicT, ?replacef:String -> Dynamic -> Dynamic -> Dynamic):DynamicT

Copies the values from the fields of from to to. If to already contains those fields, then it replace those values with the return value of the function replacef.

If not set, replacef always returns the value from the from object.

static inline function size<T>(o:DynamicT):Int

size returns how many fields are present in the object.

static function toMap<T>(o:DynamicT):Map<String, T>

objectToMap transforms an anonymous object into an instance of Map<String, Dynamic>.

static function tuples<T>(o:DynamicT):Array<Tuple2<String, T>>

Converts an object into an Array> where the left value (_0) of the tuple is the field name and the right value (_1) is the field value.

static inline function values<T>(o:DynamicT):Array<Dynamic>

values returns an array of dynamic values containing the values of each field in the argument object.

Toggle inherited fields