source: trip-planner-front/node_modules/loader-utils/lib/getOptions.js@ 1ad8e64

Last change on this file since 1ad8e64 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 398 bytes
RevLine 
[6a3a178]1'use strict';
2
3const parseQuery = require('./parseQuery');
4
5function getOptions(loaderContext) {
6 const query = loaderContext.query;
7
8 if (typeof query === 'string' && query !== '') {
9 return parseQuery(loaderContext.query);
10 }
11
12 if (!query || typeof query !== 'object') {
13 // Not object-like queries are not supported.
14 return {};
15 }
16
17 return query;
18}
19
20module.exports = getOptions;
Note: See TracBrowser for help on using the repository browser.