aboutsummaryrefslogtreecommitdiffhomepage
path: root/public/bower_components/moment/src/lib/utils/to-int.js
diff options
context:
space:
mode:
Diffstat (limited to 'public/bower_components/moment/src/lib/utils/to-int.js')
-rw-r--r--public/bower_components/moment/src/lib/utils/to-int.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/public/bower_components/moment/src/lib/utils/to-int.js b/public/bower_components/moment/src/lib/utils/to-int.js
new file mode 100644
index 0000000..fb48941
--- /dev/null
+++ b/public/bower_components/moment/src/lib/utils/to-int.js
@@ -0,0 +1,12 @@
+import absFloor from './abs-floor';
+
+export default function toInt(argumentForCoercion) {
+ var coercedNumber = +argumentForCoercion,
+ value = 0;
+
+ if (coercedNumber !== 0 && isFinite(coercedNumber)) {
+ value = absFloor(coercedNumber);
+ }
+
+ return value;
+}