UNPKG

834 BJavaScriptView Raw
1'use strict'
2
3// Some properties can be optionally capitalized. We normalize them to lowercase
4const normalizeConfigCase = function ({ Build, build = Build, ...config }) {
5 const buildA = normalizeBuildCase(build)
6 return { ...config, build: buildA }
7}
8
9const normalizeBuildCase = function ({
10 Base,
11 base = Base,
12 Command,
13 command = Command,
14 Edge_handlers: EdgeHandlers,
15 edge_handlers: edgeHandlers = EdgeHandlers,
16 Environment,
17 environment = Environment,
18 Functions,
19 functions = Functions,
20 Ignore,
21 ignore = Ignore,
22 Processing,
23 processing = Processing,
24 Publish,
25 publish = Publish,
26 ...build
27} = {}) {
28 return {
29 ...build,
30 base,
31 command,
32 edge_handlers: edgeHandlers,
33 environment,
34 functions,
35 ignore,
36 processing,
37 publish,
38 }
39}
40
41module.exports = { normalizeConfigCase }