nl_tokens: Given an object of modules with dependencies generate a stats object with the usage counts : { A : { count : 2 } B : { count : 10 } }
pl_tokens: function generateUsageStats ( modules ) { function getCamelCasedDepName ( dep ) { return dep . split ( '/' ) . map ( function ( part ) { return _ . camelCase ( part ) ; } ) . join ( '/' ) ; } return Object . <mask> ( modules ) . reduce ( function ( target , moduleName ) { var deps = modules [ moduleName ] ; deps . forEach ( function ( dependency ) { const camelCasedDepName = getCamelCasedDepName ( dependency ) ; if ( ! target [ camelCasedDepName ] ) { target [ camelCasedDepName ] = { count : 0 } ; } target [ camelCasedDepName ] . count += 1 ; } ) ; return target ; } , { } ) ; }