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:
parent
dee8562c7f
commit
992e02d896
4
packages/utils/package-lock.json
generated
4
packages/utils/package-lock.json
generated
@ -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"
|
||||
|
@ -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/",
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user