nl_tokens: Returns the API of the platform contained in dir . Potential errors : module isn t found can t load or doesn t implement the expected interface .
pl_tokens: function getPlatformApiFunction ( dir ) { let PlatformApi ; try { PlatformApi = exports . requireNoCache ( dir ) ; } catch ( <mask> ) { // Module not found or threw error during loading err . message = ` ${ dir } \n ${ err . message } ` ; throw err ; } // Module doesn't implement the expected interface if ( ! PlatformApi || ! PlatformApi . createPlatform ) { throw new Error ( ` ${ dir } ` ) ; } events . emit ( 'verbose' , 'Platform API successfully found in: ' + dir ) ; return PlatformApi ; }