How to install with composer external library that drupal module depends on Module bootstrap_languages depends on external library of same name how do we ask composer to require the external library that needs to go to libraries/bootstrap_languages folder

The project's composer.json already includes installer-paths but how can I make use of them ?

    "installer-paths": {
        "core": [
            "type:drupal-core"
        ],
        ....
        "libraries/{$name}": [
            "type:drupal-library"
        ]


NOTE: the module itself has not taken care of this dependency
You should be able to include this package via composer by adding some repository info.

Add a package definition to your repositories section in your composer.json. The resulting repositories section may look like this:

"repositories": [
    {
        "type": "composer",
        "url": "https://packages.drupal.org/8"
    },
    {
        "type": "package",
        "package": {
            "name": "usrz/bootstrap-languages",
            "type": "drupal-library",
            "version": "dev-master",
            "dist": {
                "url": "https://github.com/usrz/bootstrap-languages/archive/master.zip",
                "type": "zip"
            }
        }
    }
]


Then you can just use composer require like:

composer require usrz/bootstrap-languages


This will add a new line to your require section in composer.json like

"usrz/bootstrap-languages": "dev-master"


Normally I would try to use this approach with a release tag of a package, rather than the master branch, but no tag exists for this repository.