aboutsummaryrefslogtreecommitdiff
path: root/src/util.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/util.js')
-rw-r--r--src/util.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/util.js b/src/util.js
new file mode 100644
index 0000000..6de07e5
--- /dev/null
+++ b/src/util.js
@@ -0,0 +1,9 @@
+module.exports = {
+ timestamp() {
+ return parseInt(+(new Date())/1000)
+ },
+
+ isNumeric(n) {
+ return !isNaN(parseFloat(n)) && isFinite(n)
+ }
+} \ No newline at end of file