Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
com.msabhi:flywheel-tvosarm64
Advanced tools
A simple and predictable state management library inspired by Flux + Elm + Redux. Flywheel is built on top of Corotuines using the concepts of structured concurrency. At the core, lies the State Machine which is based on actor model.
The goal was to make the state management concept of Redux simple, understandable & easy to use in Kotlin based projects. To achieve that, we adapted only the core concepts from Redux and slightly modified them. We excluded Android, Apple or any platform-specific dependencies. It is just pure Kotlin. By doing so, you are free to choose your architecture that best suits your codebase, no need to make any big refactor to fit in Flywheel. Don't be fooled by its simplicity, Flywheel got you covered for all practical use-cases. Even if we missed anything, it can be easily extended to support your use cases.
kotlin {
sourceSets {
val commonMain by getting {
dependencies {
implementation("com.msabhi:flywheel:1.1.5-RC")
}
}
}
}
dependencies {
implementation("com.msabhi:flywheel-android:1.1.5-RC")
}
You can use the Swift Package Manager to install Flywheel
by adding the proper description to your Package.swift
file:
// swift-tools-version:5.3
import PackageDescription
let package = Package(
name: "YOUR_PROJECT_NAME",
dependencies: [
.package(url: "https://github.com/abhimuktheeswarar/Flywheel.git", from: "1.1.5-RC"),
]
)
Then run swift build
whenever you get prepared.
This is how a simple counter example looks like.
Define a state.
data class CounterState(val counter: Int = 0) : State
Define actions that can change the state.
sealed interface CounterAction : Action {
object IncrementAction : CounterAction
object DecrementAction : CounterAction
}
Define a reducer that updates the state based on the action & current state.
val reduce = reducerForAction<CounterAction, CounterState> { action, state ->
with(state) {
when (action) {
is CounterAction.IncrementAction -> copy(counter = counter + 1)
is CounterAction.DecrementAction -> copy(counter = counter - 1)
}
}
}
Create a StateReserve.
val stateReserve = StateReserve(
initialState = InitialState.set(CounterState()),
reduce = reduce)
Listen for state changes
stateReserve.states.collect { state -> println(state.counter) }
Send actions to StateReserve to update the state.
stateReserve.dispatch(IncrementAction)
Copyright (C) 2021 Abhi Muktheeswarar
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
FAQs
Kotlin-Multiplatform state management library
We found that com.msabhi:flywheel-tvosarm64 demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.