import EtaErr from './err' ; returns export const promiseImpl = new Function ( 'return this' ) ( ) . Promise ; returns export function getAsyncFunctionConstructor ( ) { try { return new Function ( 'return (async function(){}).constructor' ) ( ) ; } catch ( e ) { if ( e instanceof SyntaxError ) { throw EtaErr ( "This environment doesn't support async/await" ) ; } else { throw e ; } } } param str returns export function trimLeft ( str ) { if ( ! ! String . prototype . trimLeft ) { return str . trimLeft ( ) ; } else { return str . replace ( /^\s+/ , '' ) ; } } param str returns export function trimRight ( str ) { if ( ! ! String . prototype . trimRight ) { return str . trimRight ( ) ; } else { return str . replace ( /\s+$/ , '' ) ; } }