New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@amendable/expand-style-shorthands

Package Overview
Dependencies
Maintainers
2
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@amendable/expand-style-shorthands - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

dist/commonjs/transform.js

12

dist/commonjs/index.js

@@ -10,6 +10,14 @@ "use strict";

var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
var _objectSpread3 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread"));
var _inlineStyleExpandShorthand = require("inline-style-expand-shorthand");
var _lodash = _interopRequireDefault(require("lodash"));
var _defaultMatch = _interopRequireDefault(require("./defaultMatch"));
var _transform = _interopRequireDefault(require("./transform"));
var _default = function _default() {

@@ -27,3 +35,5 @@ var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {

value = _ref2.value;
return (0, _inlineStyleExpandShorthand.expandProperty)(key, value);
return _lodash["default"].reduce((0, _inlineStyleExpandShorthand.expandProperty)(key, value), function (memo, val, key) {
return (0, _objectSpread3["default"])({}, memo, (0, _defineProperty2["default"])({}, key, (0, _transform["default"])(val)));
}, {});
}

@@ -30,0 +40,0 @@ };

@@ -0,3 +1,7 @@

import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread";
import { expandProperty } from 'inline-style-expand-shorthand';
import _ from 'lodash';
import defaultMatch from './defaultMatch';
import transform from './transform';
export default (function () {

@@ -15,5 +19,7 @@ var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {

value = _ref2.value;
return expandProperty(key, value);
return _.reduce(expandProperty(key, value), function (memo, val, key) {
return _objectSpread({}, memo, _defineProperty({}, key, transform(val)));
}, {});
}
};
});

6

package.json
{
"name": "@amendable/expand-style-shorthands",
"version": "0.0.1",
"version": "0.0.2",
"main": "dist/commonjs/index.js",

@@ -32,4 +32,6 @@ "module": "dist/esm/index.js",

"dependencies": {
"inline-style-expand-shorthand": "^1.1.1"
"inline-style-expand-shorthand": "^1.1.1",
"is-number": "^7.0.0",
"lodash": "^4.17.11"
}
}
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