SHARE
TWEET

Toby Inkster

a guest Aug 5th, 2010 347 Never
  1. function MyBigFunctionThatConvertsManyTypes (value, type)
  2. {
  3.   // ...
  4. }
  5.  
  6. context.registerTypeConversion('xsd:integer', function(x){ MyBigFunctionThatConvertsManyTypes(x, 'integer'); });
  7. context.registerTypeConversion('xsd:double', function(x){ MyBigFunctionThatConvertsManyTypes(x, 'double'); });
  8. context.registerTypeConversion('xsd:dateTime', function(x){ MyBigFunctionThatConvertsManyTypes(x, 'dateTime'); });
RAW Paste Data
Top