Comparing version 0.1.0 to 0.2.0
{ | ||
"name": "labs-core", | ||
"version": "0.1.0", | ||
"version": "0.2.0", | ||
"description": "Core classes to Labs : expression, dimensions, multipliers, et cetera.", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -1,3 +0,3 @@ | ||
const _ = require('lodash'); | ||
const Exp = require('./exp'); | ||
const build = require('./util').build; | ||
@@ -7,18 +7,2 @@ let Dimensions = (function() { | ||
const build = function(map, values, defaults) { | ||
return Object.keys(map || []).reduce(function(result, key) { | ||
if (_.isObject(map[key]) && !Array.isArray(map[key])) { | ||
result[key] = map[key]; | ||
result[key].key = key; | ||
return result; | ||
} | ||
result[key] = {}; | ||
values.forEach(function(current, i) { | ||
result[key][current] = map[key][i] || (defaults ? defaults[i] : undefined); | ||
}); | ||
result[key].key = key; | ||
return result; | ||
}, {}); | ||
}; | ||
const UNITS = build({ | ||
@@ -25,0 +9,0 @@ 'm': ['Metro'], |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
28432
11
678