
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

ngx-lssis an angular library that provides a reactive adapter forlocalStorageAPI
Observable APIsave, get, remove)jasminenpm i ngx-lss
NgxLocalStorageModule to root module of your appimport { NgxLocalStorageModule } from 'ngx-lss';
@NgModule({
// ...
imports: [
// ...
NgxLocalStorageModule.forRoot(),
]
})
export class AppModule { }
import { Component } from '@angular/core';
import { NgxLocalStorageService } from 'ngx-lss';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.scss']
})
export class AppComponent {
public constructor(
private readonly NgxLocalStorageService: NgxLocalStorageService,
) {
// ...
}
}
💡 This is a recommended way to use the
ngx-lssin your applications. It allows you to clearly separate the logic of working with the local storage from the business logic of your application. Also, this way, you can easily replace the library with another storage or your own implementation.
import { Injectable } from '@angular/core';
import { NgxLocalStorageService } from 'ngx-lss';
import { map, Observable } from 'rxjs';
import { UserSecret } from '../models/user-secret';
const USER_SECRET_STORAGE_KEY = 'user';
@Injectable({ providedIn: 'root' })
export class UserSecretStorageService {
/** Credential secret of the current user. */
public readonly currentSecret$: Observable<UserSecret | null>;
public constructor(
private readonly storageService: NgxLocalStorageService,
) {
this.currentSecret$ = this.storageService.get<UserSecret>(USER_SECRET_STORAGE_KEY);
}
/**
* Saves secret to the current storage.
* @param secret Secret to save.
*/
public saveSecret(
secret: UserSecret,
): Observable<UserSecret> {
return this.storageService.save(USER_SECRET_STORAGE_KEY, secret).pipe(map(() => secret));
}
/** Removes current secret. */
public removeSecret(): Observable<void> {
return this.storageService.remove(USER_SECRET_STORAGE_KEY);
}
}
import { Component } from '@angular/core';
import { NgxLocalStorageService } from 'ngx-lss';
const COUNTER_KEY = 'counter';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent {
/** Clicks counter. */
public readonly counter$: Observable<number | null>;
public constructor(
private readonly storage: NgxLocalStorageService,
) {
this.counter$ = this.storage.get<number>(COUNTER_KEY);
}
public onUserClick(): void {
this.counter$.pipe(
first(),
map(counter => counter ?? 0),
switchMap(counter => this.storage.save(COUNTER_KEY, counter + 1)),
).subscribe();
}
}
FAQs
Reactive adapter for browser's `localStoarge` API
The npm package ngx-lss receives a total of 5 weekly downloads. As such, ngx-lss popularity was classified as not popular.
We found that ngx-lss 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.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.