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

cyprex-ui

Package Overview
Dependencies
Maintainers
2
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cyprex-ui - npm Package Compare versions

Comparing version 0.1.4 to 0.1.5

6

build/Button.js

@@ -27,3 +27,3 @@ 'use strict';

_extends({
type: props.type || 'button',
type: props.type,
className: _getClasses(props),

@@ -53,2 +53,6 @@ onClick: _onClick.bind(null, props)

Button.defaultProps = {
type: 'button'
};
function _getClasses(props) {

@@ -55,0 +59,0 @@ var classes = ['btn'];

@@ -52,2 +52,14 @@ 'use strict';

var _utils = require('./utils');
Object.keys(_utils).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function get() {
return _utils[key];
}
});
});
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

@@ -1,2 +0,2 @@

"use strict";
'use strict';

@@ -10,2 +10,4 @@ Object.defineProperty(exports, "__esModule", {

exports.getRemainingProps = getRemainingProps;
exports.getText = getText;
exports.setText = setText;
function getRemainingProps(Component, props) {

@@ -21,2 +23,34 @@ var rest = _extends({}, props);

return rest;
}
function getText(data, culture) {
var defaultValue = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
if (!data || !culture || typeof culture !== 'string' || culture.length < 2) {
return defaultValue;
}
var language = culture.substring(0, 2).toLowerCase();
try {
data = JSON.parse(data);
return data[language] || defaultValue;
} catch (e) {
return defaultValue;
}
}
function setText(data, text, culture) {
var language = culture.substring(0, 2).toLowerCase();
var i18n = {};
try {
i18n = JSON.parse(data);
} catch (e) {// eslint-disable-line no-empty
}
i18n[language] = text;
return JSON.stringify(i18n);
}

2

package.json
{
"name": "cyprex-ui",
"version": "0.1.4",
"version": "0.1.5",
"description": "Cyprex basic UI components",

@@ -5,0 +5,0 @@ "main": "build/index.js",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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