Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

labs-core

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

labs-core - npm Package Compare versions

Comparing version 0.1.0 to 0.2.0

src/util.js

2

package.json
{
"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'],

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc