kui-utils 0.0.20 → 0.0.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/index.js +1 -1
- package/cjs/index.js.map +1 -1
- package/index.js +1 -1
- package/index.js.map +1 -1
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -241,7 +241,7 @@ var cropText = function (text, limit) {
|
|
|
241
241
|
|
|
242
242
|
var cases = [2, 0, 1, 1, 1, 2];
|
|
243
243
|
var declineByNumber = function (num, titles, withoutNumber) {
|
|
244
|
-
return num
|
|
244
|
+
return typeof num === "number"
|
|
245
245
|
? "".concat(withoutNumber ? "" : "".concat(num, " ")).concat(titles[num % 100 > 4 && num % 100 < 20
|
|
246
246
|
? 2
|
|
247
247
|
: cases[num % 10 < 5 ? num % 10 : 5]])
|