Skip to content

Instantly share code, notes, and snippets.

View lncitador's full-sized avatar
🏡
Working from home

Walaff Fernandes lncitador

🏡
Working from home
View GitHub Profile
@lncitador
lncitador / react-native-blurhash+2.1.2.patch
Last active November 3, 2025 02:48
Patch for react-native-blurhash@2.1.2 - Fix Kotlin compilation error: Return type mismatch in getExportedCustomDirectEventTypeConstants()
diff --git a/node_modules/react-native-blurhash/android/src/main/java/com/mrousavy/blurhash/BlurhashViewManager.kt b/node_modules/react-native-blurhash/android/src/main/java/com/mrousavy/blurhash/BlurhashViewManager.kt
index 0000000..1111111 100644
--- a/node_modules/react-native-blurhash/android/src/main/java/com/mrousavy/blurhash/BlurhashViewManager.kt
+++ b/node_modules/react-native-blurhash/android/src/main/java/com/mrousavy/blurhash/BlurhashViewManager.kt
@@ -109,6 +109,7 @@ class BlurhashViewManager :
override fun getExportedCustomDirectEventTypeConstants(): MutableMap<String, Any>? {
return MapBuilder.builder<String, Any>()
.put(LoadErrorEvent.EVENT_NAME, MapBuilder.of("registrationName", "onLoadError"))
.put(LoadStartEvent.EVENT_NAME, MapBuilder.of("registrationName", "onLoadStart"))
.put(LoadEndEvent.EVENT_NAME, MapBuilder.of("registrationName", "onLoadEnd"))
@lncitador
lncitador / README.md
Last active September 8, 2025 08:42
AdonisJS Lucid Mapper Utility

This abstract Mapper class provides a flexible and type-safe way to serialize, transform, and label AdonisJS Lucid models and their paginated results. It is designed to help you build clean API responses and DTOs in AdonisJS projects.

Features

  • Supports serialization of single models, arrays, and paginated results.
  • Custom serialization logic via subclassing.
  • Utility for picking specific fields and relations from models.
  • Label mapping mechanism for enums or field names.

Use this utility to keep your API layer clean, consistent, and maintainable when working with AdonisJS and Lucid ORM.