cscg24-guacamole

CSCG 2024 Challenge 'Guacamole Mashup'
git clone https://git.sinitax.com/sinitax/cscg24-guacamole
Log | Files | Refs | sfeed.txt

parsing-flags.js (644B)


      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        invalidEra: null,
     11        invalidMonth: null,
     12        invalidFormat: false,
     13        userInvalidated: false,
     14        iso: false,
     15        parsedDateParts: [],
     16        era: null,
     17        meridiem: null,
     18        rfc2822: false,
     19        weekdayMismatch: false,
     20    };
     21}
     22
     23export default function getParsingFlags(m) {
     24    if (m._pf == null) {
     25        m._pf = defaultParsingFlags();
     26    }
     27    return m._pf;
     28}