use-descendants
Advanced tools
Comparing version 1.0.0-beta.2 to 1.0.0-beta.3
@@ -1,1 +0,1 @@ | ||
function e(e){if(e&&e.__esModule)return e;var r=Object.create(null);return e&&Object.keys(e).forEach(function(t){if("default"!==t){var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})}}),r.default=e,r}var r=e(require("react")),t=r.createContext({});exports.Descendants=function(e){return e.value.reset(),h(t.Provider,{value:e.value},e.children)},exports.useDescendant=function(e){var n=r.useContext(t),u=r.useRef(Math.random().toString(36).substr(2,9));return null==n?void 0:n.get(u.current,e)},exports.useDescendants=function(){var e=r.useRef(0),t=r.useRef({}),n=r.useCallback(function(){e.current=0,t.current={}},[]),u=r.useCallback(function(r,n){return t.current[r]||(t.current[r]={index:e.current++}),t.current[r].props=n,t.current[r].index},[]);return r.useMemo(function(){return{get:u,map:t,reset:n}},[])}; | ||
function e(e){if(e&&e.__esModule)return e;var r=Object.create(null);return e&&Object.keys(e).forEach(function(t){if("default"!==t){var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})}}),r.default=e,r}var r=e(require("react")),t=r.createContext({});exports.Descendants=function(e){return e.value.reset(),h(t.Provider,{value:e.value},e.children)},exports.useDescendant=function(e){var n=r.useContext(t),u=r.useRef();return u.current||(u.current=Math.random().toString(36).substr(2,9)),null==n?void 0:n.get(u.current,e)},exports.useDescendants=function(){var e=r.useRef(0),t=r.useRef();t.current||(t.current={});var n=function(){e.current=0,t.current={}},u=function(r,n){return t.current[r]||(t.current[r]={index:e.current++}),t.current[r].props=n,t.current};return r.useMemo(function(){return{get:u,map:t,reset:n}},[])}; |
@@ -1,1 +0,1 @@ | ||
import*as e from"react";var r=e.createContext({}),t=function(e){return e.value.reset(),h(r.Provider,{value:e.value},e.children)},n=function(){var r=e.useRef(0),t=e.useRef({}),n=e.useCallback(function(){r.current=0,t.current={}},[]),u=e.useCallback(function(e,n){return t.current[e]||(t.current[e]={index:r.current++}),t.current[e].props=n,t.current[e].index},[]);return e.useMemo(function(){return{get:u,map:t,reset:n}},[])};function u(t){var n=e.useContext(r),u=e.useRef(Math.random().toString(36).substr(2,9));return null==n?void 0:n.get(u.current,t)}export{t as Descendants,u as useDescendant,n as useDescendants}; | ||
import*as r from"react";var e=r.createContext({}),t=function(r){return r.value.reset(),h(e.Provider,{value:r.value},r.children)},n=function(){var e=r.useRef(0),t=r.useRef();t.current||(t.current={});var n=function(){e.current=0,t.current={}},u=function(r,n){return t.current[r]||(t.current[r]={index:e.current++}),t.current[r].props=n,t.current};return r.useMemo(function(){return{get:u,map:t,reset:n}},[])};function u(t){var n=r.useContext(e),u=r.useRef();return u.current||(u.current=Math.random().toString(36).substr(2,9)),null==n?void 0:n.get(u.current,t)}export{t as Descendants,u as useDescendant,n as useDescendants}; |
@@ -1,1 +0,1 @@ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],t):t((e||self).useDescendants={},e.react)}(this,function(e,t){function n(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach(function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}}),t.default=e,t}var r=n(t),u=r.createContext({});e.Descendants=function(e){return e.value.reset(),h(u.Provider,{value:e.value},e.children)},e.useDescendant=function(e){var t=r.useContext(u),n=r.useRef(Math.random().toString(36).substr(2,9));return null==t?void 0:t.get(n.current,e)},e.useDescendants=function(){var e=r.useRef(0),t=r.useRef({}),n=r.useCallback(function(){e.current=0,t.current={}},[]),u=r.useCallback(function(n,r){return t.current[n]||(t.current[n]={index:e.current++}),t.current[n].props=r,t.current[n].index},[]);return r.useMemo(function(){return{get:u,map:t,reset:n}},[])}}); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],t):t((e||self).useDescendants={},e.react)}(this,function(e,t){function r(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach(function(r){if("default"!==r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}}),t.default=e,t}var n=r(t),u=n.createContext({});e.Descendants=function(e){return e.value.reset(),h(u.Provider,{value:e.value},e.children)},e.useDescendant=function(e){var t=n.useContext(u),r=n.useRef();return r.current||(r.current=Math.random().toString(36).substr(2,9)),null==t?void 0:t.get(r.current,e)},e.useDescendants=function(){var e=n.useRef(0),t=n.useRef();t.current||(t.current={});var r=function(){e.current=0,t.current={}},u=function(r,n){return t.current[r]||(t.current[r]={index:e.current++}),t.current[r].props=n,t.current};return n.useMemo(function(){return{get:u,map:t,reset:r}},[])}}); |
{ | ||
"name": "use-descendants", | ||
"version": "1.0.0-beta.2", | ||
"version": "1.0.0-beta.3", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "main": "./dist/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5239