Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes15kdownloads
parse-options.js18 linesDownload Raw Back to internal
1'use strict'
2
3// parse out just the options we care about
4const looseOption = Object.freeze({ loose: true })
5const emptyOpts = Object.freeze({ })
6const parseOptions = options => {
7  if (!options) {
8    return emptyOpts
9  }
10
11  if (typeof options !== 'object') {
12    return looseOption
13  }
14
15  return options
16}
17module.exports = parseOptions
18 
codekingpro/portable-devtools · Team Ai