carvalhoviniciusluiz /
node-devise
| 1 | 'use strict' |
||
| 2 | |||
| 3 | import moment from 'moment' |
||
| 4 | export { genToken } from './tokenizer' |
||
|
0 ignored issues
–
show
|
|||
| 5 | export { isFunction, isObject } from 'lodash' |
||
|
0 ignored issues
–
show
The variable
isObject seems to be never declared. If this is a global, consider adding a /** global: isObject */ comment.
This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed. To learn more about declaring variables in Javascript, see the MDN. Loading history...
The variable
isFunction seems to be never declared. If this is a global, consider adding a /** global: isFunction */ comment.
This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed. To learn more about declaring variables in Javascript, see the MDN. Loading history...
|
|||
| 6 | |||
| 7 | export const addDays = (offset, date) => { |
||
| 8 | date = date || new Date() |
||
| 9 | const momentAt = moment(date).add(offset, 'days') |
||
| 10 | return momentAt.toDate() |
||
| 11 | } |
||
| 12 | |||
| 13 | export const isAfter = (first, second) => { |
||
| 14 | const firstMoment = moment(first) |
||
| 15 | const secondMoment = moment(second) |
||
| 16 | return secondMoment.isAfter(firstMoment) |
||
| 17 | } |
||
| 18 | |||
| 19 | export const parseError = (error) => { |
||
| 20 | if (error.expected === 'object') { |
||
| 21 | const e = error.message |
||
| 22 | error.message = e.slice(0, e.indexOf('(object)')).trim() |
||
| 23 | } |
||
| 24 | } |
||
| 25 |
This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.
To learn more about declaring variables in Javascript, see the MDN.