Skip to content

Instantly share code, notes, and snippets.

View axelinternet's full-sized avatar

Axel Hultman axelinternet

View GitHub Profile
@ericksli
ericksli / ReactNativeExtensions.kt
Last active March 20, 2024 19:51
React Native Kotlin extension functions for creating WritableMap and WritableArray #android #react-native #kotlin
import com.facebook.react.bridge.Arguments
import com.facebook.react.bridge.WritableArray
import com.facebook.react.bridge.WritableMap
fun writableMapOf(vararg values: Pair<String, *>): WritableMap {
val map = Arguments.createMap()
for ((key, value) in values) {
when (value) {
null -> map.putNull(key)
is Boolean -> map.putBoolean(key, value)
// continuous
(
~stream = Pwhite(50, 70, 5).asStream;
)
(
~stream.next.debug("next value");
)
(