mirror of
https://github.com/hpd840321/starRiverProperty.git
synced 2026-06-10 00:40:30 +08:00
640e188270
Former-commit-id: 435fb8e3e4f8e334ad3b0e95052edbdd9547d197
18 lines
338 B
JavaScript
18 lines
338 B
JavaScript
'use strict'
|
|
|
|
// parse out just the options we care about
|
|
const looseOption = Object.freeze({ loose: true })
|
|
const emptyOpts = Object.freeze({ })
|
|
const parseOptions = options => {
|
|
if (!options) {
|
|
return emptyOpts
|
|
}
|
|
|
|
if (typeof options !== 'object') {
|
|
return looseOption
|
|
}
|
|
|
|
return options
|
|
}
|
|
module.exports = parseOptions
|