Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
@project-nos/decorators
Advanced tools
Readme
You no longer have to write all the boilerplate code needed to bring your components to life. Under the hood this library uses decorators to automatically bind attributes, actions and targets to your Web Components.
There is no better way to get a feel for what NOS decorators is and what it can do, than by seeing it for yourself:
Imagine you create a hello-world component which generates following html:
<hello-world some-number="123" some-boolean some-string="baz" some-array="[4,5,6]" some-object="{"foo":"bar"}">
<button hello-world-action="click#foo" hello-world-target="bar">…</button>
<div hello-world-targets="bazs">...</div>
<div hello-world-targets="bazs">...</div>
</hello-world>
You no longer need to query for elements on your own, listen for events or create getters
for attributes. Everything you have to do is to add the corresponding decorators to your class and properties.
import { actionable, attributable, attribute, targetable, target, targets } from '@project-nos/decorators';
@actionable()
@attributable()
@targetable()
class HelloWorld extends HTMLElement {
@attribute({ type: Number })
accessor someNumber: number
@attribute({ type: Boolean })
accessor someBoolean: boolean;
@attribute({ type: String })
accessor someString: string;
@attribute({ type: Array })
accessor someArray: [];
@attribute({ type: Object })
accessor someObject: object;
@target()
accessor bar: HTMLButtonElement;
@targets()
accessor bazs: HTMLDivElement[];
foo(event: Event) {
//...
}
}
For full documentation, visit our Wiki.
Copyright (c) Andreas Penz. Licensed unter the MIT License.
FAQs
Project NOS decorators is a library to help you develop spryker frontend components fast and easy.
The npm package @project-nos/decorators receives a total of 188 weekly downloads. As such, @project-nos/decorators popularity was classified as not popular.
We found that @project-nos/decorators demonstrated a healthy version release cadence and project activity because the last version was released less than 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.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.