nl_tokens: Given the content of an Accept - Language request header returns an array of the languages .
pl_tokens: function getAcceptedLanguagesFromHeader ( <mask> ) { if ( ! header ) { return [ ] ; } return header . split ( ',' ) . map ( lang => { const match = lang . match ( / ^[A-Z]{2,3}(-[A-Z]{2,3})? / i ) ; if ( ! match ) { return false ; } return match [ 0 ] . toLowerCase ( ) ; } ) . filter ( lang => lang ) ; }