New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

ngx-vcard

Package Overview
Dependencies
Maintainers
0
Versions
103
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ngx-vcard

Generate an RFC compliant vCard and download it.

  • 5.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
442
decreased by-51.64%
Maintainers
0
Weekly downloads
 
Created
Source

npm version Build Status Commitizen friendly Renovate enabled codecov FOSSA Status

ngx-vcard

Almost fully RFC compliant vCard Formatter, that also can download the generated vCard. Outputs VCard version 4. Maybe other version will be supported.

If you want to have another Property, please open up an issue or even better provide a PR. ;)

Installation

  1. Install from npm

    $ npm install ngx-vcard --save
    
  2. Import in app.module.ts:

    import { NgxVcardModule } from "ngx-vcard";
    
    @NgModule({
      imports: [NgxVcardModule],
    })
    export class AppModule {}
    

How to use

Use as Directive

Open in StackBlitz

/* example.component.ts */
import { Component } from "@angular/core";
import { VCard } from "ngx-vcard";

@Component({
  selector: "app-root",
  templateUrl: "./app.component.html",
  styleUrls: ["./app.component.css"],
})
export class AppComponent {
  public vCard: VCard = {
    name: {
      firstNames: "John",
      lastNames: "Doe",
    },
  };
  public generateVCardOnTheFly = (): VCard => {
    // TODO: Generate the VCard before Download
    return {
      name: { firstNames: "John", lastNames: "Doe", addtionalNames: "Auto" },
    };
  };
}
<!-- example.component.html -->
<div>
  <!-- Normal -->
  <button id="downloadButtonNormal" [vcdDownloadVCard]="vCard">Download VCard!</button>
  <!-- Generate VCard only on Click -->
  <button id="downloadButtonFunction" vcdDownloadVCard [generateVCardFunction]="generateVCardOnTheFly">Download generated VCard!</button>
</div>

Use as Formatter

Open in StackBlitz

/* example.component.ts */
import { Component } from "@angular/core";
import { VCardFormatter, VCard } from "ngx-vcard";

@Component({
  selector: "app-root",
  templateUrl: "./app.component.html",
  styleUrls: ["./app.component.css"],
})
export class AppComponent {
  public vCard: VCard = {
    name: {
      firstNames: "John",
      lastNames: "Doe",
    },
  };

  public vCardString = VCardFormatter.getVCardAsString(this.vCard);

  public ngOnInit() {
    console.log(this.vCardString);
  }
}
<!-- example.component.html -->
<p>VCard String:</p>
<p>{{vCardString}}</p>

Mentions

This project is heavily inspired from the vCards-js Package from Eric J Nesser.

RFC

License

FOSSA Status

Angular Version Compatibility

There is already a newer Angular Version than listed here? Install the latest version of this package with npm install ngx-vcard --legacy-peer-deps or add it via overrides. Report your findings as an issue so I can add support or fix a problem.

Angular VersionPackage VersionComment
17.x - 18.x5.xdrops IE support
<=18.x<=4.xsupports Internet Explorer
<=10.x<=3.xsupports Internet Explorer
<=9.x<=2.xsupports Internet Explorer

Keywords

FAQs

Package last updated on 04 Jul 2024

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc