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

ansi-to-react

Package Overview
Dependencies
Maintainers
1
Versions
67
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ansi-to-react - npm Package Compare versions

Comparing version 0.0.1 to 0.0.3

.travis.yml

18

index.js

@@ -1,16 +0,18 @@

const React = require('react');
'use strict';
const ansiToJSON = require('ansi-to-json');
var React = require('react');
var ansiToJSON = require('ansi-to-json');
function ansiJSONtoStyleBundle(ansiBundle) {
const style = {};
var style = {};
if (ansiBundle.bg) {
style.backgroundColor = `rgb(${ansiBundle.bg})`;
style.backgroundColor = 'rgb(' + ansiBundle.bg + ')';
}
if (ansiBundle.fg) {
style.color = `rgb(${ansiBundle.fg})`;
style.color = 'rgb(' + ansiBundle.fg + ')';
}
return {
content: ansiBundle.content,
style,
style: style
};

@@ -26,3 +28,3 @@ }

style: bundle.style,
key,
key: key
}, bundle.content);

@@ -39,5 +41,5 @@ }

Ansi.propTypes = {
children: React.PropTypes.string,
children: React.PropTypes.string
};
module.exports = Ansi;
{
"name": "ansi-to-react",
"version": "0.0.1",
"version": "0.0.3",
"description": "ANSI to React Elements",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"test": "mocha 'test/**/*.js'"
},

@@ -17,3 +17,14 @@ "keywords": [

"ansi-to-json": "^1.0.0"
},
"peerDependencies": {
"react": "^0.14.0 || ^15.0.0-0"
},
"devDependencies": {
"chai": "^3.5.0",
"enzyme": "^2.2.0",
"mocha": "^2.4.5",
"react": "^15.0.1",
"react-addons-test-utils": "^15.0.1",
"react-dom": "^15.0.1"
}
}
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