UNPKG

1.08 kBJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3function getName(config) {
4 return typeof config.name === 'string' ? config.name : null;
5}
6exports.getName = getName;
7/**
8 * CFBundleDisplayName is used for most things: the name on the home screen, in
9 * notifications, and others.
10 */
11function setDisplayName(configOrName, infoPlist) {
12 let name = null;
13 if (typeof configOrName === 'string') {
14 name = configOrName;
15 }
16 else {
17 name = getName(configOrName);
18 }
19 if (!name) {
20 return infoPlist;
21 }
22 return Object.assign(Object.assign({}, infoPlist), { CFBundleDisplayName: name });
23}
24exports.setDisplayName = setDisplayName;
25/**
26 * CFBundleName is recommended to be 16 chars or less and is used in lists, eg:
27 * sometimes on the App Store
28 */
29function setName(config, infoPlist) {
30 let name = getName(config);
31 if (!name) {
32 return infoPlist;
33 }
34 return Object.assign(Object.assign({}, infoPlist), { CFBundleName: name });
35}
36exports.setName = setName;
37//# sourceMappingURL=Name.js.map
\No newline at end of file