
Research
/Security News
Weaponizing Discord for Command and Control Across npm, PyPI, and RubyGems.org
Socket researchers uncover how threat actors weaponize Discord across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.
@impactdk/ngx-breakpoints
Advanced tools
This module gives you some tools to subscribe to viewport changes
The module acts on certain breakpoints that you provide to it. If you don't provide any breakpoints, the module will fall back to some built-in breakpoints. You should configure the module with your own breakpoints by providing a list of the Breakpoint type:
export const breakpoints: Breakpoints = [
Breakpoint.fromWidth('small', { maxWidth: 567 }),
Breakpoint.fromWidth('medium', { minWidth: 568, maxWidth: 767 }),
Breakpoint.fromWidth('large', { minWidth: 768, maxWidth: 1024 }),
Breakpoint.fromWidth('xlarge', { minWidth: 1025 }),
Breakpoint.fromQuery(
'small retina',
'only screen and (min-resolution: 192dpi) and (max-width: 567px)'
),
Breakpoint.fromQuery(
'medium retina',
'only screen and (min-resolution: 192dpi) and (min-width: 568px) and (max-width: 767px)'
),
Breakpoint.fromQuery(
'large retina',
'only screen and (min-resolution: 192dpi) and (min-width: 768px) and (max-width: 1024px)'
),
Breakpoint.fromQuery(
'xlarge retina',
'only screen and (min-resolution: 192dpi) and (min-width: 1025px)'
),
];
@NgModule({
imports: [BreakpointsModule.withConfiguration(breakpoints)],
})
class AppModule {}
Additionally you can provide a set of SSR options:
{
defaultSize {
width: 375;
height: 667;
}
}
Import the BreakpointService
in a component and subscribe to the breakpoint observable:
breakpoint$
: Observable that provides you with objects of the type Breakpoint
that matches the breakpoints you provided in the configuration.
class Breakpoint {
name: string;
mediaQuery: string;
}
Or you can check the viewport size and scrollbar width:
getScrollbarWidth()
: The width of the scrollbar in pixels
getSize()
: The size in pixels of the viewport represented as a ScreenSize
object
class ScreenSize {
width: number;
height: number;
}
FAQs
An Angular wrapper for `@impactdk/breakpoints`
We found that @impactdk/ngx-breakpoints demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 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 researchers uncover how threat actors weaponize Discord across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.
Security News
Socket now integrates with Bun 1.3’s Security Scanner API to block risky packages at install time and enforce your organization’s policies in local dev and CI.
Research
The Socket Threat Research Team is tracking weekly intrusions into the npm registry that follow a repeatable adversarial playbook used by North Korean state-sponsored actors.