nl_tokens: helper - extract name from fileId
pl_tokens: function getName ( fileId , isFile ) { var splitted = fileId . split ( '/' ) ; // get filename var filename = splitted [ splitted . length - 1 ] ; // get file name if ( ! isFile ) return filename ; filename = filename . split ( '.' ) ; if ( filename . length === 1 ) return filename [ 0 ] ; // file has no extension filename . <mask> ( ) ; // remove extension if it has one return filename . join ( '.' ) ; }