Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
ngx-scan-detect
Advanced tools
Detects barcode or qr code scanning on document and emits the scanned barcode.
Readme
Detects barcode or qr code scanning on document and emits the scanned barcode.
Angular directive for handling input events. Useful for determine input using a barcode-scanner.
Like binding to a regular type
event in a template, you can do something like this:
<input ngxBarCodePut
(detected)="onDetected($event)">
npm install --save ngx-scan-detect
You can then use the directive in your templates:
@Component({
selector: 'app-ngx-scan-detect',
templateUrl: './ngx-scan-detect.component.html',
styleUrls: ['./ngx-scan-detect.component.scss'],
standalone: true,
imports: [CommonModule, NgxBarCodePutDirective],
})
export class AppComponent {
public onDetected(event: IDetect) {
console.info(event);
/* {event: KeyboardEvent, value: "sezmars", time: 0.07083499999716878, type: "scanner"} */
/* {event: KeyboardEvent, value: "3333333", time: 0.17083499999716878, type: "keyboard"} */
}
public onDelete(event: IDelete) {
console.info(event);
/* {event: KeyboardEvent, value: "3333333", type: "delete"} */
}
}
Property name | Type | Default | Description |
---|---|---|---|
debounce | number | 0 | This property is necessary for scenarios such as type-ahead where the rate of user input must be controlled. |
workMode | string | manual | This property controls the automatic clearing of the input field. |
skipStart | number | 0 | Allows you to ignore the first values of the length of the input data. The search begins after entering the first character if the value is 0. |
detected | event | empty | Returns object with keyboard event, input value, data entry time and device type: keyboard or scanner . |
delete | event | empty | Returns an object with input value, keyboard event, and type. |
FAQs
Detects barcode or qr code scanning on document and emits the scanned barcode.
The npm package ngx-scan-detect receives a total of 1 weekly downloads. As such, ngx-scan-detect popularity was classified as not popular.
We found that ngx-scan-detect demonstrated a healthy version release cadence and project activity because the last version was released less than 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
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.