Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
@ngnz/copy-to-clipboard
Advanced tools
>Simple Angular module exposing basic Directive that'll try to use native `document.execCommand` to copy content text to clopboard and finally, display overidable `alert` to confirme action to user.
Simple Angular module exposing basic Directive that'll try to use native
document.execCommand
to copy content text to clopboard and finally, display overidablealert
to confirme action to user.
Install npm
package with the following commande:
$ npm install @ngzn/copy-to-clipboard
And add import inside app.module.ts
or desired module.
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { AppComponent } from './app.component';
// import Angualr CopyToClipboardModule from @ngnz
import { CopyToClipboardModule } from '@ngnz/copy-to-clipboard';
@NgModule({
declarations: [AppComponent],
imports: [
BrowserModule,
// add module inside your Angular application module
CopyToClipboardModule
],
providers: [],
bootstrap: [AppComponent],
})
export class AppModule {}
When an element that contains nzCopyToClipboard
directive is clicked, the value of nzCopyToClipboard
will be copied into the clipboard.
<button nzCopyToClipboard="Text to copy to clipboard">Copy</button>
<button [nzCopyToClipboard]="typescritpProperty">Copy</button>
This feature is exporetable without Angular wrapping to allow using inside other projet.
// import function
import { copyToClipboardFunction } from '@ngnz/copy-to-clipboard';
// user copy function logic
const myTextToCopy = 'See magic happen!';
copyToClipboardFunction(myTextToCopy);
FAQs
>Simple Angular module exposing basic Directive that'll try to use native `document.execCommand` to copy content text to clopboard and finally, display overidable `alert` to confirme action to user.
We found that @ngnz/copy-to-clipboard 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’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.