A simple npm library that provides a collection of all Star Wars character names and the ability to generate a random unique Star Wars name.
To install the all-starwars-names
library, use the following command:
npm install all-starwars-names
-
Get all Star Wars names:
const { all } = require('all-starwars-names'); console.log(all);
This will return an array of all the Star Wars character names.
-
Get a random unique Star Wars name:
const { random } = require('all-starwars-names'); console.log(random());
This will return a single, unique Star Wars character name.
The all-starwars-names
library provides the following API:
-
all
:- Description: Returns an array of all the Star Wars character names.
- Usage:
const { all } = require('all-starwars-names'); console.log(all);
-
random()
:- Description: Returns a single, unique Star Wars character name.
- Usage:
const { random } = require('all-starwars-names'); console.log(random());
If you find any issues or have suggestions for improvements, please feel free to open an issue or submit a pull request on the GitHub repository.
This project is licensed under the MIT License.