From 992e02d8966bfd98aa2bd14998acf378d90b011c Mon Sep 17 00:00:00 2001 From: Vjacheslav Trushkin Date: Wed, 26 May 2021 11:12:56 +0300 Subject: [PATCH] Make default provider an optional parameter when converting icon name in utils --- packages/utils/package-lock.json | 4 ++-- packages/utils/package.json | 2 +- packages/utils/src/icon/name.ts | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/utils/package-lock.json b/packages/utils/package-lock.json index 2bb2bc2..9925156 100644 --- a/packages/utils/package-lock.json +++ b/packages/utils/package-lock.json @@ -1,12 +1,12 @@ { "name": "@iconify/utils", - "version": "1.0.2", + "version": "1.0.3", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@iconify/utils", - "version": "1.0.2", + "version": "1.0.3", "license": "MIT", "dependencies": { "@iconify/types": "^1.0.6" diff --git a/packages/utils/package.json b/packages/utils/package.json index e9d33a7..673e2ac 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -2,7 +2,7 @@ "name": "@iconify/utils", "description": "Common functions for working with Iconify icon sets used by various packages.", "author": "Vjacheslav Trushkin", - "version": "1.0.2", + "version": "1.0.3", "license": "MIT", "bugs": "https://github.com/iconify/iconify/issues", "homepage": "https://iconify.design/", diff --git a/packages/utils/src/icon/name.ts b/packages/utils/src/icon/name.ts index df38cc6..3adc4e2 100644 --- a/packages/utils/src/icon/name.ts +++ b/packages/utils/src/icon/name.ts @@ -20,9 +20,9 @@ export type IconifyIconSource = Omit; export const stringToIcon = ( value: string, validate?: boolean, - allowSimpleName?: boolean + allowSimpleName?: boolean, + provider = '' ): IconifyIconName | null => { - let provider = ''; const colonSeparated = value.split(':'); // Check for provider with correct '@' at start