date-and-time
Version:
The simplest, most intuitive date and time library
2 lines (1 loc) • 300 B
JavaScript
class e{}class n{}const t=(e,n,t)=>{const l=e.exec(n)?.[0]||"";return{value:+l,length:l.length,token:t}},l=(e,n,t)=>e.reduce((e,l,g)=>l.length>e.length&&!n.indexOf(l)?{value:g,length:l.length,token:t}:e,{value:-1,length:0,token:t});export{e as FormatterPlugin,n as ParserPlugin,t as exec,l as find};