nuke-helper
Advanced tools
Comparing version 2.2.17 to 2.2.18
@@ -6,2 +6,11 @@ # Change Log | ||
<a name="2.2.18"></a> | ||
## [2.2.18](https://gitlab.alibaba-inc.com/nuke/helper/compare/v2.2.17...v2.2.18) (2018-09-30) | ||
**Note:** Version bump only for package nuke-helper | ||
<a name="2.2.17"></a> | ||
@@ -8,0 +17,0 @@ ## [2.2.17](https://gitlab.alibaba-inc.com/nuke/helper/compare/v2.2.16...v2.2.17) (2018-09-26) |
@@ -6,2 +6,5 @@ 'use strict'; | ||
}); | ||
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; | ||
exports.fixSmallUnit = fixSmallUnit; | ||
@@ -12,2 +15,5 @@ | ||
function fixSmallUnit(unit) { | ||
if ((typeof unit === 'undefined' ? 'undefined' : _typeof(unit)) === 'object' && 'raw' in unit) { | ||
unit = unit.raw; | ||
} | ||
var num = parseInt(unit, 10); | ||
@@ -14,0 +20,0 @@ if (num > 6) return unit; |
{ | ||
"name": "nuke-helper", | ||
"version": "2.2.17", | ||
"version": "2.2.18", | ||
"description": "辅助函数", | ||
@@ -44,7 +44,7 @@ "main": "lib/index", | ||
"dependencies": { | ||
"nuke-env": "^2.2.17" | ||
"nuke-env": "^2.2.18" | ||
}, | ||
"devDependencies": { | ||
"nuke-text": "^2.2.17", | ||
"nuke-view": "^2.2.17" | ||
"nuke-text": "^2.2.18", | ||
"nuke-view": "^2.2.18" | ||
}, | ||
@@ -55,3 +55,3 @@ "publishConfig": { | ||
"license": "Apache", | ||
"gitHead": "b43c293c8511d74cde3ba57166bf5596acf8a1dd" | ||
"gitHead": "854b86a59c94718da62efdc7c397974442afd5f3" | ||
} |
import { isWeb } from 'nuke-env'; | ||
export function fixSmallUnit(unit) { | ||
if (typeof unit === 'object' && 'raw' in unit) { | ||
unit = unit.raw; | ||
} | ||
const num = parseInt(unit, 10); | ||
@@ -5,0 +8,0 @@ if (num > 6) return unit; |
29124
547
Updatednuke-env@^2.2.18