A justice of the peace shall have the powers and perform the duties prescribed by law.