nl_tokens: Normalize the view transformation plugins
pl_tokens: function normalizeViewPlugins ( plugins , appType ) { return plugins . map ( pluginInfo => { let pluginItem = pluginInfo ; let pluginOptions ; if ( Array . isArray ( pluginInfo ) ) { pluginItem = pluginInfo [ 0 ] ; pluginOptions = pluginInfo [ 1 ] ; } if ( typeof pluginItem === 'string' ) { let pluginPath = BUILTIN_PLUGINS [ pluginItem ] ; if ( typeof pluginPath === 'function' ) { pluginPath = pluginPath ( appType ) ; } else if ( pluginPath && typeof pluginPath === 'object' ) { pluginPath = pluginPath [ appType ] || pluginPath . <mask> ; } if ( pluginPath && Array . isArray ( pluginPath ) ) { pluginOptions = pluginPath [ 1 ] ; pluginPath = pluginPath [ 0 ] ; } pluginPath && ( pluginItem = pluginPath ) ; } if ( typeof pluginItem === 'string' ) { pluginItem = require ( pluginItem ) ; } return pluginOptions ? [ pluginItem , pluginOptions ] : pluginItem ; } ) ; }