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

use-descendants

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

use-descendants - npm Package Compare versions

Comparing version 1.0.0-beta.1 to 1.0.0-beta.2

2

dist/index.js

@@ -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.useEffect(function(){return n},[]),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(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}},[])};

@@ -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.useEffect(function(){return n},[]),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 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};

@@ -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.useEffect(function(){return n},[]),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 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}},[])}});
{
"name": "use-descendants",
"version": "1.0.0-beta.1",
"version": "1.0.0-beta.2",
"license": "MIT",

@@ -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