Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
UI Components + streaming, async, high performance, HTML templating for Node.js and the browser.
A declarative, HTML-based language that makes building web apps fun 🔥
Docs ∙ Try Online ∙ Contribute ∙ Get Support
Marko is HTML reimagined as a language for building dynamic and reactive user interfaces. Almost any valid HTML is valid Marko, and Marko extends HTML for building modern applications more declaratively. Among these extensions are conditionals and lists, state, and components.
Marko supports both single-file components and components across separate files.
The following renders a button and a counter of how many times the button has been pressed:
click-count.marko
class {
onCreate() {
this.state = { count: 0 };
}
increment() {
this.state.count++;
}
}
style {
.count {
color: #09c;
font-size: 3em;
}
.press-me {
padding: 0.5em;
}
}
<output.count>
${state.count}
</output>
<button.press-me on-click('increment')>
Press me!
</button>
The same component as above, but split into:
index.marko
template filecomponent.js
component JS logic filestyle.css
component styles fileindex.marko
<output.count>
${state.count}
</output>
<button.press-me on-click('increment')>
Press me!
</button>
component.js
export default {
onCreate() {
this.state = { count: 0 };
},
increment() {
this.state.count++;
},
};
style.css
.count {
color: #09c;
font-size: 3em;
}
.press-me {
padding: 0.5em;
}
Marko also supports a beautifully concise syntax as an alternative to its HTML syntax:
Concise syntax | HTML syntax |
---|---|
|
|
npm install marko
Ask and answer StackOverflow questions with the |
Come hang out in our Discord chat, ask questions, and discuss project direction |
Tweet to |
Marko would not be what it is without all those who have contributed ✨
FAQs
UI Components + streaming, async, high performance, HTML templating for Node.js and the browser.
The npm package marko receives a total of 4,744 weekly downloads. As such, marko popularity was classified as popular.
We found that marko demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 7 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
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.