@archoleat/validate-font-file-name 1.2.6 → 1.2.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +1 -1
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{parse as
|
|
1
|
+
import{parse as n}from"node:path";import{error as i}from"@archoleat/notifier";import{FONT_FILE_NAME_REGEX as m}from"@archoleat/reglib";const f=async a=>{const{file:t,regex:e=""}=a;if(!t||typeof t!="string")return await i({message:"Invalid file provided. File must be a non-empty string."}),!1;const s=n(t).base,o=typeof e=="string"&&e!=="",r=new RegExp(o?e:e||m);return r.test(s)?!0:(await i({message:`(${s}) doesn't match with (${r})`}),!1)};export{f as validateFontFileName};
|