const fs = require ( 'fs' ) ; const util = require ( 'util' ) ; const supportedExtensions = require ( './extensions' ) ; param m returns { * } module . exports . getDefault = ( ( m ) => ( m . default ? m . default : m ) ) ; type { * | Function } module . exports . pawExistsSync = ( ( filePath , fileSystem = fs ) => { if ( fileSystem . existsSync ( filePath ) ) return filePath ; let resolvedFilePath = '' ; supportedExtensions . javascript . forEach ( ( jsExt ) => { if ( resolvedFilePath ) { return ; } if ( fileSystem . existsSync ( filePath + jsExt ) ) { resolvedFilePath = filePath + jsExt ; } } ) ; return resolvedFilePath ; } ) ; module . exports . pawDebug = global . pawDebug || ( ( data , options = { } ) => { console . log ( util . inspect ( data , { depth : 10 , ... options } ) ) ; } ) ;