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

react-katex

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-katex - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

6

dist/react-katex.js
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory(require("React"), require("katex"));
module.exports = factory(require("react"), require("katex"));
else if(typeof define === 'function' && define.amd)
define("ReactKaTeX", ["React", "katex"], factory);
define("ReactKaTeX", ["react", "katex"], factory);
else if(typeof exports === 'object')
exports["ReactKaTeX"] = factory(require("React"), require("katex"));
exports["ReactKaTeX"] = factory(require("react"), require("katex"));
else

@@ -9,0 +9,0 @@ root["ReactKaTeX"] = factory(root["React"], root["katex"]);

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

!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("React"),require("katex")):"function"==typeof define&&define.amd?define("ReactKaTeX",["React","katex"],t):"object"==typeof exports?exports.ReactKaTeX=t(require("React"),require("katex")):e.ReactKaTeX=t(e.React,e.katex)}(this,function(e,t){return function(e){function t(n){if(r[n])return r[n].exports;var o=r[n]={exports:{},id:n,loaded:!1};return e[n].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}([function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=r(1);Object.defineProperty(t,"InlineMath",{enumerable:!0,get:function(){return n(o)["default"]}});var u=r(5);Object.defineProperty(t,"BlockMath",{enumerable:!0,get:function(){return n(u)["default"]}})},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=r(2),u=n(o),a=r(3),i=n(a),l=function(e){var t=e.html;return u["default"].createElement("span",{dangerouslySetInnerHTML:{__html:t}})};l.propTypes={html:u["default"].PropTypes.string.isRequired},t["default"]=(0,i["default"])(l,{displayMode:!1})},function(t,r){t.exports=e},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),l=r(2),f=n(l),c=r(4),s=n(c),p=function(e,t){var r=t.displayMode,n=function(t){function n(e){o(this,n);var t=u(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e));return t.usedProp=e.math?"math":"children",t.state={html:t.generateHtml(e)},t}return a(n,t),i(n,[{key:"componentWillReceiveProps",value:function(e){this.setState({html:this.generateHtml(e)})}},{key:"shouldComponentUpdate",value:function(e){return e[this.usedProp]!==this.props[this.usedProp]}},{key:"generateHtml",value:function(e){return s["default"].renderToString(e[this.usedProp],{displayMode:r})}},{key:"render",value:function(){return f["default"].createElement(e,{html:this.state.html})}}]),n}(f["default"].Component);return n.propTypes={children:f["default"].PropTypes.string,math:f["default"].PropTypes.string},n};t["default"]=p},function(e,r){e.exports=t},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=r(2),u=n(o),a=r(3),i=n(a),l=function(e){var t=e.html;return u["default"].createElement("div",{dangerouslySetInnerHTML:{__html:t}})};l.propTypes={html:u["default"].PropTypes.string.isRequired},t["default"]=(0,i["default"])(l,{displayMode:!0})}])});
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("katex")):"function"==typeof define&&define.amd?define("ReactKaTeX",["react","katex"],t):"object"==typeof exports?exports.ReactKaTeX=t(require("react"),require("katex")):e.ReactKaTeX=t(e.React,e.katex)}(this,function(e,t){return function(e){function t(n){if(r[n])return r[n].exports;var o=r[n]={exports:{},id:n,loaded:!1};return e[n].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}([function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=r(1);Object.defineProperty(t,"InlineMath",{enumerable:!0,get:function(){return n(o)["default"]}});var u=r(5);Object.defineProperty(t,"BlockMath",{enumerable:!0,get:function(){return n(u)["default"]}})},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=r(2),u=n(o),a=r(3),i=n(a),l=function(e){var t=e.html;return u["default"].createElement("span",{dangerouslySetInnerHTML:{__html:t}})};l.propTypes={html:u["default"].PropTypes.string.isRequired},t["default"]=(0,i["default"])(l,{displayMode:!1})},function(t,r){t.exports=e},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),l=r(2),f=n(l),c=r(4),s=n(c),p=function(e,t){var r=t.displayMode,n=function(t){function n(e){o(this,n);var t=u(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e));return t.usedProp=e.math?"math":"children",t.state={html:t.generateHtml(e)},t}return a(n,t),i(n,[{key:"componentWillReceiveProps",value:function(e){this.setState({html:this.generateHtml(e)})}},{key:"shouldComponentUpdate",value:function(e){return e[this.usedProp]!==this.props[this.usedProp]}},{key:"generateHtml",value:function(e){return s["default"].renderToString(e[this.usedProp],{displayMode:r})}},{key:"render",value:function(){return f["default"].createElement(e,{html:this.state.html})}}]),n}(f["default"].Component);return n.propTypes={children:f["default"].PropTypes.string,math:f["default"].PropTypes.string},n};t["default"]=p},function(e,r){e.exports=t},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=r(2),u=n(o),a=r(3),i=n(a),l=function(e){var t=e.html;return u["default"].createElement("div",{dangerouslySetInnerHTML:{__html:t}})};l.propTypes={html:u["default"].PropTypes.string.isRequired},t["default"]=(0,i["default"])(l,{displayMode:!0})}])});
{
"name": "react-katex",
"version": "1.0.0",
"version": "1.0.1",
"description": "Display math in TeX with KaTeX and ReactJS",

@@ -5,0 +5,0 @@ "keywords": [

@@ -18,3 +18,8 @@ const path = require('path');

externals: {
react: 'React',
react: {
root: 'React',
commonjs: 'react',
commonjs2: 'react',
amd: 'react'
},
katex: 'katex'

@@ -21,0 +26,0 @@ },

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