js基礎類型的擴展 string 和 String

擴展基礎類型的函數javascript interface String { toBool: () => boolean; } String.prototype.toBool = function (): boolean { return this.valueOf() === '1' || this.valueOf().toUpperCase() === 'TRUE' || fal
相關文章
相關標籤/搜索