diff --git a/next.config.js b/next.config.js index fccc445..5e1d67b 100644 --- a/next.config.js +++ b/next.config.js @@ -2,7 +2,7 @@ * Notiflix * Description: Next.js configuration. * Version: 1.0.0 -* Author: Furkan MT ('https://github.com/furcan') +* Author: Furkan ('https://github.com/furcan') * Copyright 2019-Present Notiflix, GPL-3.0 License ('https://opensource.org/licenses/GPL-3.0') */ diff --git a/src/_database/app/meta.md b/src/_database/app/meta.md index da6b8b6..b57a334 100644 --- a/src/_database/app/meta.md +++ b/src/_database/app/meta.md @@ -6,7 +6,7 @@ _dbAppMeta: metaDescription: Notiflix is a pure JavaScript library for client-side non-blocking notifications, popup boxes, loading indicators, and more to that makes your web projects much better. metaRobots: noindex, nofollow, noodp, noydir metaYearInit: 2019. - metaAuthor: 'Furkan MT - https://github.com/furcan' + metaAuthor: 'Furkan - https://github.com/furcan' metaCopyright: All Rights Reserved. metaThemeColor: "#32c682" metaTwitterUser: "@notiflixjs" diff --git a/src/application/helpers/utilities/index.ts b/src/application/helpers/utilities/index.ts index 43c0251..d1886ff 100644 --- a/src/application/helpers/utilities/index.ts +++ b/src/application/helpers/utilities/index.ts @@ -91,24 +91,24 @@ const isString = (value: unknown): value is string => typeof value === 'string' const isObject = (args: unknown): args is Record => typeof args === 'object' || args instanceof Object; -const classNamesCombiner = (names: (string | null)[]): string => names.filter((name) => isString(name)).join(' '); +const classNamesCombine = (names: (string | null)[]): string => names.filter((name) => isString(name)).join(' '); -const classNamesReplacer = (text: string): string | null => text.replace(/\s/gm, '') || null; +const classNamesTrim = (text: string): string | null => text.trim() || null; type TClassNamesParamAll = string | number | boolean | undefined | null; type TClassNamesParamObject = Record; type TClassNamesParams = TClassNamesParamAll | TClassNamesParamObject; -const classNames = (...params: TClassNamesParams[]): string => classNamesCombiner( +const classNames = (...params: TClassNamesParams[]): string => classNamesCombine( params.map((param) => { if (isString(param)) { - return classNamesReplacer(param); + return classNamesTrim(param); } if (isObject(param)) { - return classNamesCombiner(Object.entries(param).map(([key, value]) => { + return classNamesCombine(Object.entries(param).map(([key, value]) => { if (isString(key) && value === true) { - return classNamesReplacer(key); + return classNamesTrim(key); } return null; }));