Object composition and manipulation for JavaScript