Skip to content

Instantly share code, notes, and snippets.

@bnb
Created September 18, 2022 15:04
Show Gist options
  • Save bnb/087d9449211ef536d8fe63147040dee1 to your computer and use it in GitHub Desktop.
Save bnb/087d9449211ef536d8fe63147040dee1 to your computer and use it in GitHub Desktop.
async function parseOptions (options) {
const parsedOptions = {
urls: {
index: 'https://nodejs.org/dist/index.json',
schedule: 'https://raw.githubusercontent.com/nodejs/Release/master/schedule.json'
}
}
if(options?.urls?.index) {
parsedOptions.urls.index = options.urls.index
}
if(options?.urls?.schedule) {
parsedOptions.urls.schedule = options.urls.schedule
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment