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

use-asset

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

use-asset - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

18

.size-snapshot.json
{
"index.js": {
"bundled": 2688,
"minified": 1237,
"gzipped": 552,
"bundled": 2634,
"minified": 1195,
"gzipped": 529,
"treeshaked": {
"rollup": {
"code": 38,
"import_statements": 38
"code": 24,
"import_statements": 24
},
"webpack": {
"code": 1831
"code": 1757
}

@@ -17,6 +17,6 @@ }

"index.cjs.js": {
"bundled": 6225,
"minified": 3486,
"gzipped": 1310
"bundled": 6144,
"minified": 3425,
"gzipped": 1284
}
}

@@ -5,3 +5,2 @@ 'use strict';

var react = require('react');
var deepEqual = require('fast-deep-equal');

@@ -136,5 +135,3 @@

return react.useMemo(function () {
return handleAsset(fn, globalCache, args, useAsset.lifespan);
}, args);
return handleAsset(fn, globalCache, args, useAsset.lifespan);
}

@@ -141,0 +138,0 @@

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

import { useMemo } from 'react';
import deepEqual from 'fast-deep-equal';

@@ -70,3 +69,3 @@

function useAsset(fn, ...args) {
return useMemo(() => handleAsset(fn, globalCache, args, useAsset.lifespan), args);
return handleAsset(fn, globalCache, args, useAsset.lifespan);
}

@@ -73,0 +72,0 @@

{
"name": "use-asset",
"version": "1.0.2",
"version": "1.0.3",
"description": "A data fetching strategy for React Suspense",

@@ -5,0 +5,0 @@ "main": "dist/index.cjs",

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

import { useMemo } from 'react'
import deepEqual from 'fast-deep-equal'

@@ -85,6 +84,3 @@

function useAsset<Response, Args extends any[]>(fn: PromiseFn<Response, Args>, ...args: Args): Response {
return useMemo(
() => handleAsset(fn, globalCache as PromiseCache<Response, Args>[], args, useAsset.lifespan),
args
) as Response
return handleAsset(fn, globalCache as PromiseCache<Response, Args>[], args, useAsset.lifespan) as Response
}

@@ -91,0 +87,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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