Multi-environment JavaScript client for pebbles-compliant services