UNPKG

824 BJavaScriptView Raw
1'use strict';
2
3Object.defineProperty(exports, '__esModule', {
4 value: true
5});
6exports.default = getConfigsOfProjectsToRun;
7
8var _getProjectDisplayName = _interopRequireDefault(
9 require('./getProjectDisplayName')
10);
11
12function _interopRequireDefault(obj) {
13 return obj && obj.__esModule ? obj : {default: obj};
14}
15
16/**
17 * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
18 *
19 * This source code is licensed under the MIT license found in the
20 * LICENSE file in the root directory of this source tree.
21 */
22function getConfigsOfProjectsToRun(namesOfProjectsToRun, projectConfigs) {
23 const setOfProjectsToRun = new Set(namesOfProjectsToRun);
24 return projectConfigs.filter(config => {
25 const name = (0, _getProjectDisplayName.default)(config);
26 return name && setOfProjectsToRun.has(name);
27 });
28}