2
0
mirror of https://github.com/iconify/iconify.git synced 2025-01-07 15:44:05 +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", "name": "@iconify/utils",
"version": "1.0.2", "version": "1.0.3",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "@iconify/utils", "name": "@iconify/utils",
"version": "1.0.2", "version": "1.0.3",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@iconify/types": "^1.0.6" "@iconify/types": "^1.0.6"

View File

@ -2,7 +2,7 @@
"name": "@iconify/utils", "name": "@iconify/utils",
"description": "Common functions for working with Iconify icon sets used by various packages.", "description": "Common functions for working with Iconify icon sets used by various packages.",
"author": "Vjacheslav Trushkin", "author": "Vjacheslav Trushkin",
"version": "1.0.2", "version": "1.0.3",
"license": "MIT", "license": "MIT",
"bugs": "https://github.com/iconify/iconify/issues", "bugs": "https://github.com/iconify/iconify/issues",
"homepage": "https://iconify.design/", "homepage": "https://iconify.design/",

View File

@ -20,9 +20,9 @@ export type IconifyIconSource = Omit<IconifyIconName, 'name'>;
export const stringToIcon = ( export const stringToIcon = (
value: string, value: string,
validate?: boolean, validate?: boolean,
allowSimpleName?: boolean allowSimpleName?: boolean,
provider = ''
): IconifyIconName | null => { ): IconifyIconName | null => {
let provider = '';
const colonSeparated = value.split(':'); const colonSeparated = value.split(':');
// Check for provider with correct '@' at start // Check for provider with correct '@' at start