@yookue/ts-lang-utils
Advanced tools
Comparing version 0.1.58 to 0.1.59
@@ -516,3 +516,3 @@ var __defProp = Object.defineProperty; | ||
static getProp(object, prop) { | ||
if (typeof object !== "object" || !prop || prop.length === 0) { | ||
if (typeof object !== "object" || !prop) { | ||
return void 0; | ||
@@ -519,0 +519,0 @@ } |
@@ -192,3 +192,3 @@ var __defProp = Object.defineProperty; | ||
static randomString(minLength, maxLength, characters = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789") { | ||
if (!minLength || minLength <= 0 || maxLength && maxLength < minLength || characters.length === 0) { | ||
if (!minLength || minLength <= 0 || maxLength && maxLength < minLength || !characters) { | ||
return void 0; | ||
@@ -195,0 +195,0 @@ } |
@@ -778,3 +778,3 @@ var __defProp = Object.defineProperty; | ||
static isEmpty(text) { | ||
return !text || text.length === 0; | ||
return !text; | ||
} | ||
@@ -813,3 +813,3 @@ /** | ||
static isBlank(text) { | ||
return !text || (text == null ? void 0 : text.length) === 0 || /^\s*$/.test(text); | ||
return !text || /^\s*$/.test(text); | ||
} | ||
@@ -1488,3 +1488,3 @@ /** | ||
static substringAfter(text, separator) { | ||
if (!text || !separator || separator.length === 0) { | ||
if (!text || !separator) { | ||
return void 0; | ||
@@ -1509,3 +1509,3 @@ } | ||
static substringAfterLast(text, separator) { | ||
if (!text || !separator || separator.length === 0) { | ||
if (!text || !separator) { | ||
return void 0; | ||
@@ -1529,3 +1529,3 @@ } | ||
static substringBefore(text, separator) { | ||
if (!text || !separator || separator.length === 0) { | ||
if (!text || !separator) { | ||
return void 0; | ||
@@ -1550,3 +1550,3 @@ } | ||
static substringBeforeLast(text, separator) { | ||
if (!text || !separator || separator.length === 0) { | ||
if (!text || !separator) { | ||
return void 0; | ||
@@ -1553,0 +1553,0 @@ } |
@@ -239,3 +239,3 @@ import _typeof from "@babel/runtime/helpers/esm/typeof"; | ||
value: function getProp(object, prop) { | ||
if (_typeof(object) !== 'object' || !prop || prop.length === 0) { | ||
if (_typeof(object) !== 'object' || !prop) { | ||
return undefined; | ||
@@ -242,0 +242,0 @@ } |
@@ -84,3 +84,3 @@ import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck"; | ||
var characters = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'; | ||
if (!minLength || minLength <= 0 || maxLength && maxLength < minLength || characters.length === 0) { | ||
if (!minLength || minLength <= 0 || maxLength && maxLength < minLength || !characters) { | ||
return undefined; | ||
@@ -87,0 +87,0 @@ } |
@@ -411,3 +411,3 @@ import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck"; | ||
value: function isEmpty(text) { | ||
return !text || text.length === 0; | ||
return !text; | ||
} | ||
@@ -422,3 +422,3 @@ }, { | ||
value: function isBlank(text) { | ||
return !text || (text === null || text === void 0 ? void 0 : text.length) === 0 || /^\s*$/.test(text); | ||
return !text || /^\s*$/.test(text); | ||
} | ||
@@ -693,3 +693,3 @@ }, { | ||
value: function substringAfter(text, separator) { | ||
if (!text || !separator || separator.length === 0) { | ||
if (!text || !separator) { | ||
return undefined; | ||
@@ -703,3 +703,3 @@ } | ||
value: function substringAfterLast(text, separator) { | ||
if (!text || !separator || separator.length === 0) { | ||
if (!text || !separator) { | ||
return undefined; | ||
@@ -713,3 +713,3 @@ } | ||
value: function substringBefore(text, separator) { | ||
if (!text || !separator || separator.length === 0) { | ||
if (!text || !separator) { | ||
return undefined; | ||
@@ -723,3 +723,3 @@ } | ||
value: function substringBeforeLast(text, separator) { | ||
if (!text || !separator || separator.length === 0) { | ||
if (!text || !separator) { | ||
return undefined; | ||
@@ -726,0 +726,0 @@ } |
{ | ||
"name": "@yookue/ts-lang-utils", | ||
"version": "0.1.58", | ||
"version": "0.1.59", | ||
"title": "TsLangUtils", | ||
@@ -5,0 +5,0 @@ "description": "Common lang utilities for typescript", |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
360629