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

unplugin-icons

Package Overview
Dependencies
Maintainers
2
Versions
90
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

unplugin-icons - npm Package Compare versions

Comparing version 0.12.21 to 0.12.22

4

dist/loaders.d.ts

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

import { Awaitable } from '@antfu/utils';
import { CustomIconLoader } from './types';
import '@antfu/utils';
declare function FileSystemIconLoader(dir: string): CustomIconLoader;
declare function FileSystemIconLoader(dir: string, transform?: (svg: string) => Awaitable<string>): CustomIconLoader;
export { FileSystemIconLoader };

@@ -9,4 +9,4 @@ "use strict";Object.defineProperty(exports, "__esModule", {value: true});

var _fs = require('fs');
function FileSystemIconLoader(dir) {
return (name) => {
function FileSystemIconLoader(dir, transform) {
return async (name) => {
const pathes = [

@@ -18,4 +18,6 @@ `${dir}/${name}.svg`,

for (const path of pathes) {
if (_fs.existsSync.call(void 0, path))
return _fs.promises.readFile(path, "utf-8");
if (_fs.existsSync.call(void 0, path)) {
const svg = await _fs.promises.readFile(path, "utf-8");
return typeof transform === "function" ? await transform(svg) : svg;
}
}

@@ -22,0 +24,0 @@ };

{
"name": "unplugin-icons",
"version": "0.12.21",
"version": "0.12.22",
"description": "Access thousands of icons as components on-demand universally",

@@ -5,0 +5,0 @@ "homepage": "https://github.com/antfu/unplugin-icons",

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