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.
ngx-text-diff
Advanced tools
component
to be used with Angular and based on google diff match patch
library.npm i ngx-text-diff
module: NgxTextDiffModule
component: NgxTextDiffComponent
selector: td-ngx-text-diff
Input | Type | Required | Description |
---|---|---|---|
left | string | Yes | First text to be compared |
right | string | Yes | Second text to be compared |
diffContent | Observable | Optional | DiffContent observable |
format | DiffTableFormat | Optional, default: SideBySide | Possible values: - SideBySide - LineByLine |
loading | boolean | Optional, default: false | Possible values: - true : shows an loading spinner.- false : hides the loading spinner |
hideMatchingLines | boolean | Optional, default: false | Possible values: - true : Only shows lines with differences.- false : shows all lines |
showToolbar | boolean | Optional, default: true | Possible values: - true : shows the toolbar.- false : hides the format toolbar |
showBtnToolbar | boolean | Optional, default: true | Possible values: - true : shows the format toolbar.- false : hides the format toolbar |
outerContainerClass | any | Optional | ngClass object for the outer div |
outerContainerStyle | any | Optional | ngStyle object for the outer style |
toolbarClass | any | Optional | ngClass object for the toolbar div |
toolbarStyle | any | Optional | ngStyle object for the toolbar style |
compareRowsClass | any | Optional | ngClass object for the div surrounding the table rows |
compareRowsStyle | any | Optional | ngStyle object for the div surrounding the table rows |
Input | Type | Required | Description |
---|---|---|---|
compareResults | DiffResults | Optional | Event fired when comparison is executed |
export interface DiffContent {
leftContent: string;
rightContent: string;
}
export type DiffTableFormat = 'SideBySide' | 'LineByLine';
export interface DiffResults {
hasDiff: boolean;
diffsCount: number;
rowsWithDiff: {
leftLineNumber?: number;
rightLineNumber?: number;
numDiffs: number;
}[];
}
NgxTextDiffModule
in a module, for example app module.import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { AppComponent } from './app.component';
import { NgxTextDiffModule } from 'ngx-text-diff';
@NgModule({
declarations: [AppComponent],
imports: [BrowserModule, NgxTextDiffModule],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule {}
Run ng build ngx-text-diff
to build the library. The build artifacts will be stored in the dist/ngx-text-diff
directory.
This project is based on google diff match patch.
FAQs
A Text Diff component for Angular.
The npm package ngx-text-diff receives a total of 3,756 weekly downloads. As such, ngx-text-diff popularity was classified as popular.
We found that ngx-text-diff 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.