Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
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,739 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.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.