MCPcopy Create free account
hub / github.com/scottrogowski/code2flow / makeGetSet

Function makeGetSet

tests/test_code/js/moment/moment.js:701–711  ·  view source on GitHub ↗
(unit, keepTime)

Source from the content-addressed store, hash-verified

699 }
700
701 function makeGetSet(unit, keepTime) {
702 return function (value) {
703 if (value != null) {
704 set$1(this, unit, value);
705 hooks.updateOffset(this, keepTime);
706 return this;
707 } else {
708 return get(this, unit);
709 }
710 };
711 }
712
713 function get(mom, unit) {
714 return mom.isValid()

Callers 1

moment.jsFile · 0.85

Calls 2

set$1Function · 0.85
getFunction · 0.85

Tested by

no test coverage detected