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

react-inlinesvg

Package Overview
Dependencies
Maintainers
1
Versions
78
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-inlinesvg - npm Package Compare versions

Comparing version 4.0.0-0 to 4.0.0

10

package.json
{
"name": "react-inlinesvg",
"version": "4.0.0-0",
"version": "4.0.0",
"description": "An SVG loader for React",

@@ -43,3 +43,5 @@ "author": "Gil Barbara <gilbarbara@gmail.com>",

"*": {
"provider": ["dist/provider.d.ts"]
"provider": [
"dist/provider.d.ts"
]
}

@@ -62,3 +64,3 @@ },

"@size-limit/preset-small-lib": "^8.2.6",
"@swc/core": "^1.3.74",
"@swc/core": "^1.3.75",
"@testing-library/jest-dom": "^5.17.0",

@@ -71,3 +73,3 @@ "@testing-library/react": "^14.0.0",

"@types/node-fetch": "^2.6.4",
"@types/react": "^18.2.18",
"@types/react": "^18.2.19",
"@types/react-dom": "^18.2.7",

@@ -74,0 +76,0 @@ "browser-cache-mock": "^0.1.7",

13

README.md

@@ -62,3 +62,4 @@ # react-inlinesvg

**cacheRequests** {boolean} ▶︎ `true`
Cache remote SVGs.
Cache remote SVGs.
Starting in version 4.x, you can also cache the files permanently, read more [below](#caching).

@@ -141,11 +142,5 @@ **description** {string}

The internal cache is exported as `cacheStore` if you need to debug or pre-cache some files.
Since version 4.x, the `cacheStore` is an instance of the [Cache](src/cache.ts) class instead of a plain object.
⚠️ Use it at your own risk.
You can use the browser's cache to store the SVGs permanently.
To set it up, wrap your app with the cache provider:
### Persistent cache
Starting with version 4.x, you can use the browser's [cache](https://developer.mozilla.org/en-US/docs/Web/API/Cache) to store the SVGs.
To set it up, you need to wrap your app with the provider:
```typescript

@@ -152,0 +147,0 @@ import { createRoot } from 'react-dom/client';

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