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

karet

Package Overview
Dependencies
Maintainers
1
Versions
53
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

karet - npm Package Compare versions

Comparing version 1.1.11 to 1.2.0

.nyc_output/03fa33a941f5f1d0bda39874d0904af7.json

3

dist/karet.cjs.js

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

var karet = process.env.NODE_ENV === "production" ? infestines.assocPartialU("createElement", createElement$1, React) : Object.defineProperty(infestines.assocPartialU("createElement", createElement$1, infestines.dissocPartialU("PropTypes", React)), "PropTypes", {
var karet = process.env.NODE_ENV === "production" ? /*#__PURE__*/infestines.assocPartialU("createElement", createElement$1, React) : /*#__PURE__*/Object.defineProperty(infestines.assocPartialU("createElement", createElement$1, infestines.dissocPartialU("PropTypes", React)), "PropTypes", {
get: function (React$$1) {

@@ -388,3 +388,4 @@ return function () {

exports.fromKefir = fromKefir;
exports.createElement = createElement$1;
exports['default'] = karet;
exports.fromClass = fromClass;

@@ -367,3 +367,3 @@ import { Component, createElement } from 'react';

var karet = process.env.NODE_ENV === "production" ? assocPartialU("createElement", createElement$1, React) : Object.defineProperty(assocPartialU("createElement", createElement$1, dissocPartialU("PropTypes", React)), "PropTypes", {
var karet = process.env.NODE_ENV === "production" ? /*#__PURE__*/assocPartialU("createElement", createElement$1, React) : /*#__PURE__*/Object.defineProperty(assocPartialU("createElement", createElement$1, dissocPartialU("PropTypes", React)), "PropTypes", {
get: function (React$$1) {

@@ -384,2 +384,2 @@ return function () {

export { fromKefir, fromClass };export default karet;
export { fromKefir, createElement$1 as createElement, fromClass };export default karet;

@@ -385,2 +385,3 @@ (function (global, factory) {

exports.fromKefir = fromKefir;
exports.createElement = createElement$1;
exports['default'] = karet;

@@ -387,0 +388,0 @@ exports.fromClass = fromClass;

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

!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports,require("react"),require("kefir"),require("infestines")):"function"==typeof define&&define.amd?define(["exports","react","kefir","infestines"],r):r(e.karet=e.karet||{},e.React,e.Kefir,e.I)}(this,function(e,r,n,t){"use strict";function i(e,r){e.at=0,e.doSubscribe(r),e.at=1}function a(e,r,n){if(P(e))return n[r.at++];if(t.isArray(e)){for(var i=e,s=0,l=e.length;s<l;++s){var o=e[s],u=o;P(o)?u=n[r.at++]:t.isArray(o)&&(u=a(o,r,n)),u!==o&&(i===e&&(i=e.slice(0)),i[s]=u)}return i}return e}function s(e,r,n){var t=void 0;for(var i in e){var a=e[i];if(P(a)){if(!t){t={};for(var s in e){if(s===i)break;t[s]=e[s]}}t[i]=n[r.at++]}else t&&(t[i]=a)}return t||e}function l(e,r){var n=e.props,t=null,i=null,l=null;e.at=0;for(var o in n){var u=n[o];U===o?l=a(u,e,r):"$$type"===o?t=n[o]:$===o?(i=i||{},i.ref=P(u)?r[e.at++]:u):P(u)?(i=i||{},i[o]=r[e.at++]):g===o?(i=i||{},i.style=s(u,e,r)||u):(i=i||{},i[o]=u)}return l instanceof Array?W.apply(null,[t,i].concat(l)):l?W(t,i,l):W(t,i)}function o(e,r,n){for(var i=0,a=e.length;i<a;++i){var s=e[i];P(s)?n(r,s):t.isArray(s)&&o(s,r,n)}}function u(e,r,n){for(var i in e){var a=e[i];if(P(a))n(r,a);else if(U===i)t.isArray(a)&&o(a,r,n);else if(g===i)for(var s in a){var l=a[s];P(l)&&n(r,l)}}}function f(e){e.values+=1}function c(e,r){r.offAny(e)}function v(e,r){var n=e.pop();n&&r.offAny(n)}function h(e,r){r.onAny(e)}function d(e,r){var n=function r(n){for(var t=e.handlers,i=0;t[i]!==r;)++i;switch(n.type){case m:var a=n.value,s=e.values;s[i]!==a&&(s[i]=a,e.at&&e.forceUpdate());break;case A:throw n.value;default:t[i]=null;var l=t.length;if(l!==e.values.length)return;for(var o=0;o<l;++o)if(t[o])return;e.handlers=null}};e.handlers.push(n),r.onAny(n)}function p(e,r){for(var n=r.length;e<n;++e){var i=r[e];if(P(i)||t.isArray(i)&&p(0,i))return!0}return!1}function y(e){for(var r in e){var n=e[r];if(P(n))return!0;if(U===r){if(t.isArray(n)&&p(0,n))return!0}else if(g===r)for(var i in n)if(P(n[i]))return!0}return!1}function b(e,r){var n={$$type:e};for(var t in r){var i=r[t];"ref"===t?n[$]=i:w!==t&&(n[t]=i)}return n}function k(){for(var e=arguments.length,r=Array(e),n=0;n<e;n++)r[n]=arguments[n];var i=r[0],a=r[1]||t.object0;return(t.isString(i)||a[w])&&(p(2,r)||y(a)?(r[1]=b(i,a),r[0]=C):a[w]&&(r[1]=t.dissocPartialU(w,a)||t.object0)),W.apply(void 0,r)}var m="value",A="error",g="style",U="children",w="karet-lift",$="$$ref",W=r.createElement,j=r.Component,P=function(e){return e instanceof n.Observable},S=t.inherit(function(e){j.call(this,e),this.at=0},j,{componentWillReceiveProps:function(e){this.componentWillUnmount(),i(self,e)},componentWillMount:function(){i(this,this.props)}}),q=t.inherit(function(e){S.call(this,e),this.callback=this.rendered=null},S,{componentWillUnmount:function(){var e=this.callback;e&&this.props.observable.offAny(e)},doSubscribe:function(e){var r=this,n=e.observable;if(P(n)){var t=function(e){switch(e.type){case m:r.rendered=e.value||null,r.at&&r.forceUpdate();break;case A:throw e.value;case"end":r.callback=null}};this.callback=t,n.onAny(t)}else this.rendered=n||null;this.at=1},render:function(){return this.rendered}}),x=function(e){return W(q,{observable:e})},C=t.inherit(function(e){S.call(this,e),this.values=this,this.handlers=null},S,{componentWillUnmount:function(){var e=this.handlers;e instanceof Function?u(this.props,e,c):e&&u(this.props,e.reverse(),v)},doSubscribe:function(e){var r=this;this.values=0,u(e,this,f);var n=this.values;switch(n){case 0:this.values=t.array0;break;case 1:this.values=this,u(e,this.handlers=function(e){switch(e.type){case m:var n=e.value;r.values!==n&&(r.values=n,r.at&&r.forceUpdate());break;case A:throw e.value;default:r.values=[r.values],r.handlers=null}},h);break;default:this.values=Array(n).fill(this),this.handlers=[],u(e,this,d)}},render:function(){if(this.handlers instanceof Function){var e=this.values;return e===this?null:l(this,[e])}for(var r=this.values,n=0,t=r.length;n<t;++n)if(r[n]===this)return null;return l(this,r)}}),E=t.assocPartialU("createElement",k,r),F=function(e){return function(r){return W(C,b(e,r))}};e.fromKefir=x,e.default=E,e.fromClass=F,Object.defineProperty(e,"__esModule",{value:!0})});
!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports,require("react"),require("kefir"),require("infestines")):"function"==typeof define&&define.amd?define(["exports","react","kefir","infestines"],r):r(e.karet=e.karet||{},e.React,e.Kefir,e.I)}(this,function(e,r,n,t){"use strict";function i(e,r){e.at=0,e.doSubscribe(r),e.at=1}function a(e,r,n){if(P(e))return n[r.at++];if(t.isArray(e)){for(var i=e,s=0,l=e.length;s<l;++s){var o=e[s],u=o;P(o)?u=n[r.at++]:t.isArray(o)&&(u=a(o,r,n)),u!==o&&(i===e&&(i=e.slice(0)),i[s]=u)}return i}return e}function s(e,r,n){var t=void 0;for(var i in e){var a=e[i];if(P(a)){if(!t){t={};for(var s in e){if(s===i)break;t[s]=e[s]}}t[i]=n[r.at++]}else t&&(t[i]=a)}return t||e}function l(e,r){var n=e.props,t=null,i=null,l=null;e.at=0;for(var o in n){var u=n[o];U===o?l=a(u,e,r):"$$type"===o?t=n[o]:$===o?(i=i||{},i.ref=P(u)?r[e.at++]:u):P(u)?(i=i||{},i[o]=r[e.at++]):g===o?(i=i||{},i.style=s(u,e,r)||u):(i=i||{},i[o]=u)}return l instanceof Array?W.apply(null,[t,i].concat(l)):l?W(t,i,l):W(t,i)}function o(e,r,n){for(var i=0,a=e.length;i<a;++i){var s=e[i];P(s)?n(r,s):t.isArray(s)&&o(s,r,n)}}function u(e,r,n){for(var i in e){var a=e[i];if(P(a))n(r,a);else if(U===i)t.isArray(a)&&o(a,r,n);else if(g===i)for(var s in a){var l=a[s];P(l)&&n(r,l)}}}function f(e){e.values+=1}function c(e,r){r.offAny(e)}function v(e,r){var n=e.pop();n&&r.offAny(n)}function h(e,r){r.onAny(e)}function d(e,r){var n=function r(n){for(var t=e.handlers,i=0;t[i]!==r;)++i;switch(n.type){case k:var a=n.value,s=e.values;s[i]!==a&&(s[i]=a,e.at&&e.forceUpdate());break;case A:throw n.value;default:t[i]=null;var l=t.length;if(l!==e.values.length)return;for(var o=0;o<l;++o)if(t[o])return;e.handlers=null}};e.handlers.push(n),r.onAny(n)}function p(e,r){for(var n=r.length;e<n;++e){var i=r[e];if(P(i)||t.isArray(i)&&p(0,i))return!0}return!1}function y(e){for(var r in e){var n=e[r];if(P(n))return!0;if(U===r){if(t.isArray(n)&&p(0,n))return!0}else if(g===r)for(var i in n)if(P(n[i]))return!0}return!1}function b(e,r){var n={$$type:e};for(var t in r){var i=r[t];"ref"===t?n[$]=i:w!==t&&(n[t]=i)}return n}function m(){for(var e=arguments.length,r=Array(e),n=0;n<e;n++)r[n]=arguments[n];var i=r[0],a=r[1]||t.object0;return(t.isString(i)||a[w])&&(p(2,r)||y(a)?(r[1]=b(i,a),r[0]=E):a[w]&&(r[1]=t.dissocPartialU(w,a)||t.object0)),W.apply(void 0,r)}var k="value",A="error",g="style",U="children",w="karet-lift",$="$$ref",W=r.createElement,j=r.Component,P=function(e){return e instanceof n.Observable},S=t.inherit(function(e){j.call(this,e),this.at=0},j,{componentWillReceiveProps:function(e){this.componentWillUnmount(),i(self,e)},componentWillMount:function(){i(this,this.props)}}),q=t.inherit(function(e){S.call(this,e),this.callback=this.rendered=null},S,{componentWillUnmount:function(){var e=this.callback;e&&this.props.observable.offAny(e)},doSubscribe:function(e){var r=this,n=e.observable;if(P(n)){var t=function(e){switch(e.type){case k:r.rendered=e.value||null,r.at&&r.forceUpdate();break;case A:throw e.value;case"end":r.callback=null}};this.callback=t,n.onAny(t)}else this.rendered=n||null;this.at=1},render:function(){return this.rendered}}),x=function(e){return W(q,{observable:e})},E=t.inherit(function(e){S.call(this,e),this.values=this,this.handlers=null},S,{componentWillUnmount:function(){var e=this.handlers;e instanceof Function?u(this.props,e,c):e&&u(this.props,e.reverse(),v)},doSubscribe:function(e){var r=this;this.values=0,u(e,this,f);var n=this.values;switch(n){case 0:this.values=t.array0;break;case 1:this.values=this,u(e,this.handlers=function(e){switch(e.type){case k:var n=e.value;r.values!==n&&(r.values=n,r.at&&r.forceUpdate());break;case A:throw e.value;default:r.values=[r.values],r.handlers=null}},h);break;default:this.values=Array(n).fill(this),this.handlers=[],u(e,this,d)}},render:function(){if(this.handlers instanceof Function){var e=this.values;return e===this?null:l(this,[e])}for(var r=this.values,n=0,t=r.length;n<t;++n)if(r[n]===this)return null;return l(this,r)}}),C=t.assocPartialU("createElement",m,r),F=function(e){return function(r){return W(E,b(e,r))}};e.fromKefir=x,e.createElement=m,e.default=C,e.fromClass=F,Object.defineProperty(e,"__esModule",{value:!0})});
{
"name": "karet",
"version": "1.1.11",
"version": "1.2.0",
"description": "Karet is a library that allows you to embed Kefir observables into React VDOM",

@@ -14,3 +14,3 @@ "module": "dist/karet.es.js",

"lint": "eslint src test",
"prepublish": "npm run lint && npm run dist && npm run test",
"prepare": "npm run lint && npm run dist && npm run test",
"report-coverage": "nyc report --reporter=lcov > coverage.lcov && codecov",

@@ -17,0 +17,0 @@ "test": "nyc mocha"

@@ -25,4 +25,4 @@ [ [≡](#contents) | [Tutorial](#tutorial) | [Reference](#reference) ]

Using Karet couldn't be simpler. You just `import React from "karet"` and you
are good to go.
Using Karet couldn't be simpler. You just `import * as React from "karet"` and
you are good to go.

@@ -50,3 +50,3 @@ [![npm version](https://badge.fury.io/js/karet.svg)](http://badge.fury.io/js/karet)

```jsx
import React from "karet"
import * as React from "karet"
```

@@ -66,4 +66,9 @@

with VDOM that can have embedded [Kefir](http://rpominov.github.io/kefir/)
observables.
observables. This works because Karet exports an enhanced version of
`createElement`.
**NOTE:** Karet does not pass through other named React exports. Only
`createElement` is exported, which is all that is needed for basic use of VDOM
or the Babel JSX transform.
**NOTE:** The result, like the `Clock` above, is *just* a React component. If

@@ -83,4 +88,4 @@ you export it, you can use it just like any other React component and even in

```jsx
import * as RR from "react-router"
import React from "karet"
import * as RR from "react-router"
import * as React from "karet"

@@ -87,0 +92,0 @@ const Link1 = ({...props}) => <RR.Link karet-lift {...props}/>

@@ -356,3 +356,3 @@ import * as React from "react"

function createElement(...args) {
export function createElement(...args) {
const type = args[0]

@@ -372,4 +372,4 @@ const props = args[1] || object0

export default process.env.NODE_ENV === "production"
? assocPartialU("createElement", createElement, React)
: Object.defineProperty(assocPartialU("createElement", createElement, dissocPartialU("PropTypes", React)), "PropTypes", {
? /*#__PURE__*/assocPartialU("createElement", createElement, React)
: /*#__PURE__*/Object.defineProperty(assocPartialU("createElement", createElement, dissocPartialU("PropTypes", React)), "PropTypes", {
get: (React => () => React.PropTypes)(React)

@@ -376,0 +376,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