(m)
| 3179 | ]; |
| 3180 | |
| 3181 | function isDurationValid(m) { |
| 3182 | var key, |
| 3183 | unitHasDecimal = false, |
| 3184 | i, |
| 3185 | orderLen = ordering.length; |
| 3186 | for (key in m) { |
| 3187 | if ( |
| 3188 | hasOwnProp(m, key) && |
| 3189 | !( |
| 3190 | indexOf.call(ordering, key) !== -1 && |
| 3191 | (m[key] == null || !isNaN(m[key])) |
| 3192 | ) |
| 3193 | ) { |
| 3194 | return false; |
| 3195 | } |
| 3196 | } |
| 3197 | |
| 3198 | for (i = 0; i < orderLen; ++i) { |
| 3199 | if (m[ordering[i]]) { |
| 3200 | if (unitHasDecimal) { |
| 3201 | return false; // only allow non-integers for smallest unit |
| 3202 | } |
| 3203 | if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) { |
| 3204 | unitHasDecimal = true; |
| 3205 | } |
| 3206 | } |
| 3207 | } |
| 3208 | |
| 3209 | return true; |
| 3210 | } |
| 3211 | |
| 3212 | function isValid$1() { |
| 3213 | return this._isValid; |
no test coverage detected
searching dependent graphs…