import settings from 'electron-settings' ; export const setPersistence = ( key , value , onSuccess ? ) => { settings . set ( key , typeof value === 'boolean' ? value . toString ( ) : value ) . then ( onSuccess ) . catch ( ( ) => null ) ; } ; export const getPersistence = ( key , onSuccess ? ) => { settings . get ( key ) . then ( ( value ) => { return value && onSuccess && onSuccess ( value as string ) ; } ) . catch ( ( ) => null ) ; } ;