📅  最后修改于: 2022-03-11 15:04:03.800000             🧑  作者: Mango
const capitalize = s => s && s[0].toUpperCase() + s.slice(1)
// to always return type string event when s may be falsy other than empty-string
const capitalize = s => (s && s[0].toUpperCase() + s.slice(1)) || ""