A fully open source & end-to-end encrypted note taking alternative to Evernote.
TypeScript asp-net-coredotnet-coreelectronfosshacktoberfestnote-managmentnote-takingnote-taking-appnotebooknotesnotes-appopen-sourceopensourceprivacyproductivityreactreact-nativereactjsself-hosted
core: migrate filename.ts to javascript
Abdullah Attad9a77ff65833
diff --git a/packages/core/utils/filename.ts b/packages/core/utils/filename.jssimilarity index 77%rename from packages/core/utils/filename.tsrename to packages/core/utils/filename.jsindex fb704d808..8b91ab906 100644--- a/packages/core/utils/filename.ts+++ b/packages/core/utils/filename.js@@ -17,15 +17,22 @@ You should have received a copy of the GNU General Public Licensealong with this program. If not, see <http://www.gnu.org/licenses/>.*/-type MimeTypeInfo = {- source: string;- extensions?: string[];- charset?: string;- compressible?: boolean;-};--let db: Record<string, MimeTypeInfo>;-export function getFileNameWithExtension(filename: string, mime?: string) {+// type MimeTypeInfo = {+// source: string;+// extensions?: string[];+// charset?: string;+// compressible?: boolean;+// };++let db; // : Record<string, MimeTypeInfo>;++/**+ *+ * @param {string} filename+ * @param {string | undefined} mime+ * @returns {string}+ */+export function getFileNameWithExtension(filename, mime) {if (!mime || mime === "application/octet-stream") return filename;if (!db) db = require("mime-db");const mimeData = db[mime];