(input, unit, isSubtract)
| 203 | } |
| 204 | |
| 205 | add(input, unit, isSubtract) { |
| 206 | let another |
| 207 | if (unit) { |
| 208 | another = input * unitToMS[prettyUnit(unit)] |
| 209 | } else if (isDuration(input)) { |
| 210 | another = input.$ms |
| 211 | } else { |
| 212 | another = wrapper(input, this).$ms |
| 213 | } |
| 214 | |
| 215 | return wrapper(this.$ms + (another * (isSubtract ? -1 : 1)), this) |
| 216 | } |
| 217 | |
| 218 | subtract(input, unit) { |
| 219 | return this.add(input, unit, true) |
no test coverage detected