maintain backward compatibility - will be removed in v2 return value in future will be an object not an array
199635
function _compatibility (rs) {
  const _rs = [rs.rise, rs.transit, rs.set]
  _rs.rise = rs.rise
  _rs.transit = rs.transit
  _rs.set = rs.set
  return _rs
}
814834
function _isArrayOfObjects(value) {
  if (!Array.isArray(value)) {
    return false;
  }
  var l = value.length;
  var _type, cond;
  for (var i = 0; i < l; i++) {
    _type = typeof value[i];
    cond = _type === 'function' || _type === 'object' && !!value[i];
    if (!cond) {
      return false;
    }
  }
  return true;
}
839817
function ( object ) {
      this.__class__ = 'Unique';

      if ( 'object' === typeof object )
        this.key = object.key;

      this.validate = function ( array ) {
        var value, store = [];

        if ( !_isArray( array ) )
          throw new Violation( this, array, { value: Validator.errorCode.must_be_an_array } );

        for ( var i = 0; i < array.length; i++ ) {
          value = 'object' === typeof array[ i ] ? array[ i ][ this.key ] : array[ i ];

          if ( 'undefined' === typeof value )
            continue;

          if ( -1 !== store.indexOf( value ) )
            throw new Violation( this, array, { value: value } );

          store.push( value );
        }

        return true;
      };

      return this;
    }
1069479
function updateObjectImpl(obj, update, isSelected) {
  if (isSelected(obj)) {
    return update(obj);
  }
  var result = obj;
  var changed = false;
  _lodash2.default.forOwn(obj, function (val, key) {
    var newval = updateValue(val, update, isSelected);
    if (newval === val) {
      return;
    }
    if (!changed) {
      result = _extends({}, obj);
      changed = true;
    }
    result[key] = newval;
  });
  return result;
}
1182170
function clone(obj) {
    if (typeof obj !== 'object') {
        return obj;
    }
    var ret;
    if (util.isArray(obj)) {
        ret = [];
        obj.forEach(function (val) {
            ret.push(clone(val));
        });
        return ret;
    }
    ret = {};
    Object.keys(obj).forEach(function (key) {
        ret[key] = clone(obj[key]);
    });
    return ret;
}
513368
function unbox(value){
  if (value instanceof ResType) return when(value, unbox)
  if (value && typeof value == 'object') return unboxAll(value)
  return value
}
585183
function _clone(value) {
  if(value && typeof value === 'object') {
    var rval = Array.isArray(value) ? [] : {};
    for(var i in value) {
      rval[i] = _clone(value[i]);
    }
    return rval;
  }
  return value;
}
910161
def fix_return_value(v, method_name, method=None, checker=None):
    
    # remove common check prefix
    method_name = (method_name or method.__func__.__name__).replace("check_","")
    if v is None or not isinstance(v, Result):
        v = Result(value=v, name=method_name)

    v.name         = v.name or method_name

    v.checker      = checker
    v.check_method = method

    return v
788170
function(value) {
		"use strict";

		if (!Array.isArray(value)) {
			value = [value];
		}

		return value.map(function(data) {
			if (data === "now") {
				return new Date();
			}
			if (data instanceof Date) {
				return data;
			}
			return false;
		}).filter(function(d) { return d !== false; });
	}
1326147
function unwrapArray(arg, defaultValue) {
  const _arg = Array.isArray(arg)
    ? /* istanbul ignore next (preact) */ arg[0]
    : arg
  if (!_arg && defaultValue) {
    return defaultValue
  } else {
    return _arg
  }
}
318514
function sanitize (data) {
  if (
    !isPrimitive(data) &&
    !Array.isArray(data) &&
    !isPlainObject(data)
  ) {
    // handle types that will probably cause issues in
    // the structured clone
    return Object.prototype.toString.call(data)
  } else {
    return data
  }
}
1136232
def _getCachedValue(obj, relicFunc, resultType):
    
    # If the value has not been previously cached, fetch 
    if not obj.cached:
        obj.cached = resultType()
        relicFunc(byref(obj.cached))
    return obj.cached
33671
function deepClone ( value ) {
        var result;
    
        if ( $B.isObject(value) || $B.isArray(value) ) {
            result = ( $B.isArray(value) )? [] : {};
    
            for ( var key in value ) {
                result[key] = deepClone( value[key] );
            }
        } else {
            result = value;
        }
    
        return result;
    }
659362
function(value) {
        switch (values.typeOf(value)) {
            case 'Null':
            case 'Boolean':
            case 'String':
            case 'Number':
                return value;

            case 'RegExp':
                return String(value);

            case 'Date':
            case 'Duration':
                return value.valueOf();

            case 'Filter':
                return value.source;

            case 'Array':
                return _.map(value, this.toJSONCompatible, this);

            case 'Object':
                return _.mapObject(value, this.toJSONCompatible, this);
        }
    }
217014
def return_values(self):
        

        j = self.json()
        #TODO: FIXME: get rid of old API when its support will be removed
        public_api_value = j.get('returnValues')
        old_private_value = j.get('endpoints')
        new_private_value = self.__collect_interfaces_return(j.get('interfaces', {}))

        retvals = new_private_value or old_private_value or public_api_value or []
        # TODO: Public api hack.
        if self._router.public_api_in_use:
            return retvals
        return self.__parse(retvals)
809312
function(value) {
      switch (typeof value) {
        case 'undefined':
          return this.undefined;
        case 'string':
          return this.string;
        case 'number':
          if (value % 1 === 0) {
            return this.integer;
          } else {
            return this.double;
          }
          break;
        case 'boolean':
          return this.boolean;
        case 'function':
          return this["function"];
        default:
          if (value === null) {
            return this["null"];
          } else if (value instanceof Date) {
            return this.datetime;
          } else if (value instanceof Array) {
            return this.array;
          } else if (Buffer.isBuffer(value)) {
            throw new TypeError("Value cannot be a buffer");
          } else if (value instanceof Object) {
            return this.object;
          } else {
            throw new TypeError('Value must either be a string, integer, double, boolean, date, array, object or function');
          }
      }
    }
262401
function () {
		if ( server || ( !client.ie || client.version > 8 ) ) {
			return function ( obj, key ) {
				key = ( key === true );
				var o = [];

				if ( !isNaN( obj.length ) ) {
					o = slice.call( obj );
				}
				else if ( key ) {
					o = array.keys( obj );
				}
				else {
					utility.iterate( obj, function ( i ) {
						o.push( i );
					});
				}

				return o;
			};
		}
		else {
			return function ( obj, key ) {
				key   = ( key === true );
				var o = [];

				if ( !isNaN( obj.length ) ) {
					try {
						o = slice.call( obj );
					}
					catch ( e ) {
						utility.iterate( obj, function ( i, idx ) {
							if ( idx !== "length" ) {
								o.push( i );
							}
						});
					}
				}
				else if ( key ) {
					o = array.keys( obj );
				}
				else {
					utility.iterate( obj, function ( i ) {
						o.push( i );
					});
				}

				return o;
			};
		}
	}