UNPKG

776 BSource Map (JSON)View Raw
1{"version":3,"sources":["../src/references-empty.js"],"names":["parsed","when","negated","notEmpty","references","length"],"mappings":";;;;;;AAAA;;;;;;kBAEe,UAACA,MAAD,EAA4B;AAAA,KAAnBC,IAAmB,uEAAZ,OAAY;;AAC1C,KAAMC,UAAUD,SAAS,QAAzB;AACA,KAAME,WAAWH,OAAOI,UAAP,CAAkBC,MAAlB,GAA2B,CAA5C;AACA,QAAO,CACNH,UAAU,CAACC,QAAX,GAAsBA,QADhB,EAEN,uBAAQ,CAAC,YAAD,EAAeD,UAAU,MAAV,GAAmB,SAAlC,EAA6C,UAA7C,CAAR,CAFM,CAAP;AAIA,C","file":"references-empty.js","sourcesContent":["import message from '@commitlint/message';\n\nexport default (parsed, when = 'never') => {\n\tconst negated = when === 'always';\n\tconst notEmpty = parsed.references.length > 0;\n\treturn [\n\t\tnegated ? !notEmpty : notEmpty,\n\t\tmessage(['references', negated ? 'must' : 'may not', 'be empty'])\n\t];\n};\n"]}
\No newline at end of file