drupal 8 how to install npm package into custom module code example
Example: composer drupal install
composer create-project drupal/recommended-project my_site_name_dir
composer create-project drupal/recommended-project my_site_name_dir