Fixing a bug causing schema(Function).generate() generating non-function.
Fixing a bug causing schema(Function).generate() generating non-function.

awei01/js-schema,Yerhabe/js-schema,bradparks/js-schema,molnarg/js-schema,molnarg/js-schema,Yerhabe/js-schema,awei01/js-schema,bradparks/js-schema