Skip to content
This repository has been archived by the owner on May 11, 2018. It is now read-only.

Commit

Permalink
Add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
danez committed Mar 2, 2017
1 parent 29bd962 commit b5786d3
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions scripts/build-data.js
Expand Up @@ -56,10 +56,16 @@ const invertedEqualsEnv = Object.keys(envs)
.reduce((a, b) => {
const checkEnv = envMap[envs[b].equals] || envs[b].equals;
environments.some((env) => {
// go through all environment names to find the the current one
// and try to get the version as integer
const version = parseInt(checkEnv.replace(env, ""), 10);
if (!isNaN(version)) {
Object.keys(envs).forEach((equals) => {
// Go through all envs from compat-table and get int version
const equalsVersion = parseInt(equals.replace(env, ""), 10);
// If the current version is smaller than the version that was mentioned
// in `equals` we can add an entry, as older versions should include features
// that newer ones have
if (!isNaN(equalsVersion) && equalsVersion <= version) {
if (!a[equals]) a[equals] = [];
a[equals].push(b);
Expand Down

0 comments on commit b5786d3

Please sign in to comment.