2
0
mirror of https://github.com/iconify/iconify.git synced 2025-01-06 07:20:40 +00:00

Make default provider an optional parameter when converting icon name in utils

This commit is contained in:
Vjacheslav Trushkin 2021-05-26 11:12:56 +03:00
parent dee8562c7f
commit 992e02d896
3 changed files with 5 additions and 5 deletions

View File

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

View File

@ -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/",

View File

@ -20,9 +20,9 @@ export type IconifyIconSource = Omit<IconifyIconName, 'name'>;
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