/**
 * Facade is a structural design pattern that provides
 * a simplified interface to a library, a framework,
 * or any other complex set of classes.
 */ class Facade { public encode ( data ) { return Base64 . encode ( data ) ; } } class Base64 { static encode ( data ) { return Buffer . from ( data ) . toString ( 'base64' ) ; } static decode ( data ) { return Buffer . from ( data , 'base64' ) . toString ( 'utf-8' ) ; } } export default Facade ;