PageRenderTime 11ms CodeModel.GetById 2ms app.highlight 5ms RepoModel.GetById 1ms app.codeStats 0ms

/node_modules/moment/src/lib/create/parsing-flags.js

https://bitbucket.org/coleman333/smartsite
JavaScript | 26 lines | 24 code | 1 blank | 1 comment | 2 complexity | 3043bb1ef74ed70cc8e0409c2c6d6d9a MD5 | raw file
 1function defaultParsingFlags() {
 2    // We need to deep clone this object.
 3    return {
 4        empty           : false,
 5        unusedTokens    : [],
 6        unusedInput     : [],
 7        overflow        : -2,
 8        charsLeftOver   : 0,
 9        nullInput       : false,
10        invalidMonth    : null,
11        invalidFormat   : false,
12        userInvalidated : false,
13        iso             : false,
14        parsedDateParts : [],
15        meridiem        : null,
16        rfc2822         : false,
17        weekdayMismatch : false
18    };
19}
20
21export default function getParsingFlags(m) {
22    if (m._pf == null) {
23        m._pf = defaultParsingFlags();
24    }
25    return m._pf;
26}