/** * Construct the page title (<head><title>) from the TITLE constant, the * route's title prefix and optional contextual variables like the * username. * * @param {string} prefix */ function constructTitle(e, data, clear) { let title = clear ? TITLE : ($rootScope.title || TITLE); if (isString(data) && !isEmpty(data)) { title = `${data} :: ${title}`; } // Inject username. if (username) { title = title.replace(':username', username); } if (isPlainObject(data)) { forIn(data, (val, key) => { title = title.replace(key, val); }); } $rootScope.title = title; }
/** * _.zipWith */ zipWith(["a", "b", "c"], [1, 2, 3], (str, num) => ({ [str]: num })); // $ExpectError `x` should be a `string`, `y` a `number` zipWith(["a", "b", "c"], [1, 2, 3]).map(([x, y]) => x * y); /** * _.isString */ var boolTrue: true; var boolFalse: false; boolTrue = isString("foo"); boolFalse = isString([""]); boolFalse = isString({}); boolFalse = isString(5); boolFalse = isString(function(f) { return f; }); boolFalse = isString(); boolFalse = isString(true); // $ExpectError boolFalse = isString(""); // $ExpectError boolTrue = isString(undefined); /**
(isLength(null): false); (isMap(null): false); (isMatch(null, null): boolean); (isMatchWith(null, null, null): boolean); (isNaN(null): false); (isNative(null): false); (isNil(null): true); (isNull(null): true); (isNumber(null): false); (isObject(null): false); (isObjectLike(null): false); (isPlainObject(null): false); (isRegExp(null): false); (isSafeInteger(null): false); (isSet(null): false); (isString(null): false); (isSymbol(null): false); (isTypedArray(null): false); (isUndefined(null): false); (isWeakMap(null): false); (isWeakSet(null): false); (join(null, null): ''); (kebabCase(null): ''); (last(null): void); (lastIndexOf(null, null, null): -1); (lowerCase(null): ''); (lowerFirst(null): ''); (lt(null, null): boolean); (lte(null, null): boolean); (max(null): void); (min(null): void);