@atomist/sdm-pack-aspect
Version:
an Atomist SDM Extension Pack for visualizing drift across an organization
41 lines • 1.44 kB
JavaScript
;
/*
* Copyright © 2019 Atomist, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
const bands_1 = require("./bands");
exports.EntropySizeBands = {
zero: { exactly: 0 },
low: { upTo: 1 },
medium: { upTo: 2 },
high: bands_1.Default,
};
const StarCountBands = {
"½": { exactly: .5 },
"⭐": { exactly: 1 },
"⭐½": { exactly: 1.5 },
"⭐⭐": { exactly: 2 },
"⭐⭐½": { exactly: 2.5 },
"⭐⭐⭐": { exactly: 3 },
"⭐⭐⭐½": { exactly: 3.5 },
"⭐⭐⭐⭐": { exactly: 4 },
"⭐⭐⭐⭐½": { exactly: 4.5 },
"⭐⭐⭐⭐⭐": bands_1.Default,
};
function starBand(score) {
return bands_1.bandFor(StarCountBands, Math.round(score * 2) / 2, { casing: bands_1.BandCasing.Sentence, includeNumber: false });
}
exports.starBand = starBand;
//# sourceMappingURL=commonBands.js.map