main
Last change
on this file was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago |
Initial commit
|
-
Property mode
set to
100644
|
File size:
324 bytes
|
Rev | Line | |
---|
[d24f17c] | 1 | // parse out just the options we care about
|
---|
| 2 | const looseOption = Object.freeze({ loose: true })
|
---|
| 3 | const emptyOpts = Object.freeze({ })
|
---|
| 4 | const parseOptions = options => {
|
---|
| 5 | if (!options) {
|
---|
| 6 | return emptyOpts
|
---|
| 7 | }
|
---|
| 8 |
|
---|
| 9 | if (typeof options !== 'object') {
|
---|
| 10 | return looseOption
|
---|
| 11 | }
|
---|
| 12 |
|
---|
| 13 | return options
|
---|
| 14 | }
|
---|
| 15 | module.exports = parseOptions
|
---|
Note:
See
TracBrowser
for help on using the repository browser.