解析插值替换

@param {string} source 源码
@return {Object}
355232
function parseInterp(source) {
    var walker = new Walker(source);

    var interp = {
        type: ExprType.INTERP,
        expr: readTertiaryExpr(walker),
        filters: [],
        raw: source
    };

    while (walker.goUntil(124)) { // |
        var callExpr = readCall(walker, []);
        switch (callExpr.name.paths[0].value) {
            case 'html':
                break;
            case 'raw':
                interp.original = 1;
                break;
            default:
                interp.filters.push(callExpr);
        }
    }

    return interp;
}
1171178
@SuppressWarnings("rawtypes")
    private static Object getOneLayerClone(Object source) {
        if (null == source) {
            return null;
        }
        Object target = null;
        try {
            Constructor con = source.getClass().getConstructor();
            target = con.newInstance();
            // 把一个集合类中的数据拷贝到另一集合类中
            PropertyUtils.copyProperties(target, source);

        } catch (Exception e) {
            logger.error("clone object exception object class:" + source.getClass(), e);
        }
        return target;
    }
1089754
function getJsSource(chunk, jsName) {
  let jsSource;
  for (let i = 0, ii = chunk.modules.length; i < ii; ++i) {
    const module = chunk.modules[i];
    if (module.modules) {
      jsSource = getJsSource(module, jsName);
      if (jsSource) {
        return jsSource;
      }
    }
    if (module.identifier.endsWith(jsName) && module.source) {
      return module.source;
    }
  }
}
645680
function clone(source) {
            if (!source || typeof source !== 'object') {
                return source;
            }

            var cloned = source;

            if (isArray(source)) {
                cloned = source.slice().map(clone);
            }
            else if (isObject(source) && 'isPrototypeOf' in source) {
                cloned = {};
                for (var key in source) {
                    if (hasOwnProperty.call(source, key)) {
                        cloned[key] = clone(source[key]);
                    }
                }
            }

            return cloned;
        }
505694
function (target, source) {
            var name, s;
            for (name in source) {
                s = source[name];
                if (!(name in target) || (target[name] !== s && (!(name in empty) || empty[name] !== s))) {
                    target[name] = s;
                }
            }
            return target; // Object
        }
170937
function deepAssign(object, source) {
    for (var key in source) {
        if (source.hasOwnProperty(key)) {
            if (typeof object[key] === "object" && typeof source[key] === "object") {
                deepAssign(object[key], source[key]);
            } else {
                object[key] = source[key];
            }
        }
    }

    return object;
}
1250678
public char[] prepareSource(char[] source) {
        char[] src = new char[source.length + 2];
        System.arraycopy(source, 0, src, 0, source.length);
        src[source.length] = '\n';
        src[source.length + 1] = '\n';
        return src;
    }
227325
function mix(target, source) {
        var args = _arrSlice.call(arguments),
            i = 1,
            key, self = arguments.callee,
            //如果最后参数是布尔，判定是否覆写同名属性
            ride = $.isBoolean(args[args.length - 1]) ? args.pop() : true;
        if(args.length === 1) {
            target = !this.window ? this : _cleanObj;
            i = 0;
        }

        while((source = args[i++])) {
            //source = [{a:1},{b:3}];
            if($.isArray(source)) {
                for(var n = 0, len = source.length; n < len; n++) {
                    self(target, source[n], ride);
                }

                continue;
            }
            //杂糅只允许对象
            for(key in source) {
                if(ride || !(key in target)) {
                    target[key] = source[key];
                }
            }
        }
        return target;
    }
1188504
function (source, callback) {
        try {
            callback(null, api.clean(source));
        } catch (err) {
            callback(err, null);
        }
    }
617213
function (source) {
  var ast = parser.parseEval(source)
  var array = ast.children.find((child) => child.kind === 'array')
  return parseValue(array)
}
1048619
function(source, callback) {
        callback = callback || noop;

        //if there's a queue
        if (queue[source] instanceof Array) {
            //just add it
            return queue[source].push(callback);
        }

        //otherwise there is not a queue
        //so let's create one
        queue[source] = [callback];

        var script = document.createElement('script');
        var head = document.getElementsByTagName('head')[0];

        script.async = 1;

        head.appendChild(script);

        script.onload = script.onreadystatechange = function( _, isAbort ) {
            if(isAbort || !script.readyState || /loaded|complete/.test(script.readyState) ) {
                script.onload = script.onreadystatechange = null;
                script = undefined;

                if(!isAbort) {
                    queue[source].forEach(function(callback) {
                        callback();
                    });

                    delete queue[source];
                }
            }
        };

        script.src = source;
    }
30667
function Confirge($source)
{
    var $result = false;

    // assume the string is a file path, read the file
    if (_.isString($source))
    {
        $result = Confirge.read($source);
    }
    // execute function and return result
    else if (_.isFunction($source))
    {
        $result = Confirge($source());
    }
    // when is object, no reason to do anything!
    else if (_.isObject($source))
    {
        $result = $source;
    }

    return $result;
}
186590
function sourceString(source) {
  var message = "<css input>"
  if (source) {
    if (source.input && source.input.file) {
      message = source.input.file
    }
    if (source.start) {
      message += ":" + source.start.line + ":" + source.start.column
    }
  }

  return message
}
1037608
function merge(source, target) {
    if (target == null) {
        return clone(source);
    }
    if (source == null) {
        return clone(target);
    }
    if (typeof source !== 'object' || typeof target !== 'object') {
        return clone(target);
    }
    const merge = (source, target) => {
        Object.keys(target).forEach(key => {
            if (source[key] == null) {
                source[key] = target[key];
            } else if (typeof source[key] === 'object') {
                if (typeof target[key] === 'object') {
                    merge(source[key], target[key]);
                } else {
                    source[key] = target[key];
                }
            } else {
                source[key] = target[key];
            }
        });

        return source;
    };

    return merge(clone(source), clone(target));
}
488606
function parse(source) {

	var moduleDefinitions = {},
		moduleReferences = [];

    estraverse.traverse(esprima.parse(source), {
        leave: function (node, parent) {
			
			if(!isAngular(node)) {
				return;
			}
			
            //console.log('node:', JSON.stringify(node, null, 3));
            //console.log('parent:', JSON.stringify(parent, null, 3));
			
			var moduleName = parent.arguments[0].value;
			
			// if a second argument exists
			// this is a module definition
			if(parent.arguments[1]) {
				if(parent.arguments[1].type === 'ArrayExpression') {
					moduleDefinitions[moduleName] = parent.arguments[1].elements.map(function(item){
						return item['value'];
					});
				} else {
					throw 'Argument must be an ArrayExpression, not a variable';
				}
			} else {
				// is a module reference
				pushDistinct(moduleReferences, moduleName);
			}
					          
        }
    });
		
	return {
		modules: moduleDefinitions,
		references: moduleReferences
	}	
}
1025075
public Object javaToSql(Object source)
    {
        if (source instanceof String)
        {
            if (((String)source).trim().length() == 0)
         	    return null;
        }
        return source;
    }
16508
function clone(source) {
    var ret = {};
    for (var prop in source) {
      ret[prop] = source[prop];
    }
    return ret;
  }