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

@team-griffin/css-longhand

Package Overview
Dependencies
Maintainers
2
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@team-griffin/css-longhand - npm Package Compare versions

Comparing version 1.0.0 to 1.1.0

1

config/.eslintrc.js

@@ -7,3 +7,2 @@ module.exports = {

"extends": ["eslint:recommended", "plugin:react/recommended", "plugin:flowtype/recommended"],
"installedESLint": true,
"parserOptions": {

@@ -10,0 +9,0 @@ "ecmaFeatures": {

31

lib/index.js

@@ -9,20 +9,31 @@ 'use strict';

var _lodash = require('lodash.upperfirst');
var _ramda = require('ramda');
var _lodash2 = _interopRequireDefault(_lodash);
var r = _interopRequireWildcard(_ramda);
var _lodash3 = require('lodash.reduce');
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
var _lodash4 = _interopRequireDefault(_lodash3);
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var upperFirst = function upperFirst(str) {
return str.charAt(0).toUpperCase() + str.substr(1);
};
// const isObject = (obj) => Object.prototype.toString.call(obj) === '[object Object]';
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
var longhand = function longhand(coreProp, prop) {
return r.reduce(function (result, key) {
var k = '' + coreProp + upperFirst(key);
var v = prop[key];
var longhand = function longhand(coreProp, prop) {
return (0, _lodash4.default)(prop, function (result, value, key) {
return _extends({}, result, _defineProperty({}, '' + coreProp + (0, _lodash2.default)(key), value));
}, {});
// if (isObject(v)) {
// return {
// ...result,
// ...longhand(k, v),
// }
// } else {
return _extends({}, result, _defineProperty({}, k, v));
// }
}, {}, r.keys(prop));
};
exports.default = longhand;
{
"name": "@team-griffin/css-longhand",
"version": "1.0.0",
"version": "1.1.0",
"main": "lib/index.js",

@@ -38,5 +38,4 @@ "jsnext:main": "lib/index.js",

"dependencies": {
"lodash.reduce": "^4.6.0",
"lodash.upperfirst": "^4.3.1"
"ramda": "^0.25.0"
}
}

@@ -1,14 +0,25 @@

import upperFirst from 'lodash.upperfirst';
import reduce from 'lodash.reduce';
import * as r from 'ramda';
const upperFirst = (str) => str.charAt(0).toUpperCase() + str.substr(1);
// const isObject = (obj) => Object.prototype.toString.call(obj) === '[object Object]';
const longhand = (coreProp, prop) => {
return reduce(prop, (result, value, key) => {
return r.reduce((result, key) => {
const k = `${coreProp}${upperFirst(key)}`;
const v = prop[key];
// if (isObject(v)) {
// return {
// ...result,
// ...longhand(k, v),
// }
// } else {
return {
...result,
[`${coreProp}${upperFirst(key)}`]: value,
[k]: v,
};
}, {
});
// }
}, {}, r.keys(prop));
};
export default longhand;
export default longhand;

Sorry, the diff of this file is not supported yet

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