Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
ember-container
Advanced tools
The dependency injection in ember works through the Owner
. An object on
which objects can be registered and later on looked up. It doesn't have the most
convenient API when passing around the owner as "container" for dependencies.
Here comes ember-container
into play. A wrapper around owner for a nicer API
to embers DI.
Let's say we want to access isAuthenticated
from session
service from
ember-simple-auth
in a
function.
function canLogin({ services }) {
const { session } = services;
return session.isAuthenticated;
}
which we invoke from a component:
import { getOwner } from '@ember/application';
import Component from '@glimmer/component';
import makeContainer from 'ember-container';
export default class MyComponent extends Component {
get canLogin() {
return canLogin(makeContainer(getOwner(this)));
}
}
Whilst this is more of a showcase to demo its usage; at best, this is used as a
low-level API as part of your libraries that pipe through the Owner
into
userland code.
tbd.
FAQs
ember owner as destructable object
We found that ember-container 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
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.