nl_tokens: Returns the number of files in the given directory .
pl_tokens: function ( dir ) { var files = fs . readdirSync ( dir ) ; // Get all file stats in parallel. var paths = _ . map ( files , function ( <mask> ) { return path . join ( dir , file ) ; } ) ; var stats = _ . map ( paths , function ( path ) { return fs . statSync ( path ) ; } ) ; // Count the files. return _ . filter ( stats , function ( stat ) { return stat . isFile ( ) ; } ) . length ; }