MCPcopy Create free account
hub / github.com/scottrogowski/code2flow / addSubtract$1

Function addSubtract$1

tests/test_code/js/moment/moment.js:5189–5197  ·  view source on GitHub ↗
(duration, input, value, direction)

Source from the content-addressed store, hash-verified

5187 }
5188
5189 function addSubtract$1(duration, input, value, direction) {
5190 var other = createDuration(input, value);
5191
5192 duration._milliseconds += direction * other._milliseconds;
5193 duration._days += direction * other._days;
5194 duration._months += direction * other._months;
5195
5196 return duration._bubble();
5197 }
5198
5199 // supports only 2.0-style add(1, 's') or add(duration)
5200 function add$1(input, value) {

Callers 2

add$1Function · 0.85
subtract$1Function · 0.85

Calls 1

createDurationFunction · 0.85

Tested by

no test coverage detected