
Research
Security News
Lazarus Strikes npm Again with New Wave of Malicious Packages
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Hyperapp is a JavaScript micro-framework for building web applications.
This is our first example to get started. Right off the bat, I'll show you the hard stuff. If you survive this you basically win.
import { h, app } from "hyperapp"
import { delay } from "@hyperapp/time"
const changeName = (state, name) => ({ ...state, name })
app({
init: [
{ name: "Hello" },
delay([changeName, "World"], {
duration: 1000
})
],
view: state => <h1>{state.name}</h1>,
container: document.body
})
What's that delay
magic? Glad you asked. Here's a way it can be implemented. Hyperapp ships with effects and subscriptions out of the box, so you don't have to create your own, but like they say: knowledge is power!
// hyperapp/time.js
export const delay = (fx => (action, { duration }) => [
fx,
{ action, duration }
])((props, dispatch) =>
setTimeout(() => dispatch(props.action), props.duration)
)
npm i hyperapp
Then with a module bundler like Rollup or Webpack, use as you would anything else.
import { h, app } from "hyperapp"
If you don't want to set up a build environment, you can download Hyperapp from a CDN like unpkg.com and it will be globally available through the window.hyperapp object. We support all ES5-compliant browsers, including Internet Explorer 10 and above.
<script src="https://unpkg.com/hyperapp"></script>
FAQs
The tiny framework for building hypertext applications.
The npm package hyperapp receives a total of 4,772 weekly downloads. As such, hyperapp popularity was classified as popular.
We found that hyperapp demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.
Security News
Opengrep continues building momentum with the alpha release of its Playground tool, demonstrating the project's rapid evolution just two months after its initial launch.