diff options
Diffstat (limited to 'node_modules/moment/src/lib/utils/defaults.js')
-rw-r--r-- | node_modules/moment/src/lib/utils/defaults.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/node_modules/moment/src/lib/utils/defaults.js b/node_modules/moment/src/lib/utils/defaults.js new file mode 100644 index 0000000..45c5e87 --- /dev/null +++ b/node_modules/moment/src/lib/utils/defaults.js @@ -0,0 +1,10 @@ +// Pick the first defined of two or three arguments. +export default function defaults(a, b, c) { + if (a != null) { + return a; + } + if (b != null) { + return b; + } + return c; +} |