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

react-key-value

Package Overview
Dependencies
Maintainers
3
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-key-value - npm Package Compare versions

Comparing version 1.0.4 to 1.1.0

9

dist/key-value.js

@@ -101,2 +101,11 @@ 'use strict';

},
toJSON: function toJSON() {
var _state$rows = this.state.rows,
rows = _state$rows === undefined ? [] : _state$rows;
return rows.reduce(function (acc, row) {
acc[row.keyItem] = row.valueItem;
return acc;
}, {});
},
renderLabelText: function renderLabelText(text) {

@@ -103,0 +112,0 @@ if (this.props.hideLabels === true) {

@@ -111,2 +111,16 @@ 'use strict';

});
it('should return a json representation of rows', function () {
var rows = [{
keyItem: 'foo',
valueItem: 'bar'
}, {
keyItem: 'lorem',
valueItem: 'ipsum'
}];
var $ = (0, _enzyme.shallow)(_react2.default.createElement(_keyValue2.default, { rows: rows }));
$.instance().toJSON().should.eql({
foo: 'bar',
lorem: 'ipsum'
});
});
});

2

package.json
{
"name": "react-key-value",
"version": "1.0.4",
"version": "1.1.0",
"description": "Key value visualizer/editor written in React",

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

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