Drupal.org not officially providing a solution to add Front-end JavaScript libraries with composer command.
It's bit difficult to manage the front-end javascript libraries from NPM and Bower, but here is a way to manage that in composer.
Following command will help you to achieve this.
$ composer config repositories.asset-packagist composer https://asset-packagist.org
Once you execute the above command it will add https://asset-packagist.org as a repository in composer.json
This will update you composer.json file, and It's looks like below