npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

nice-invoice

v1.1.8

Published

An easy and quick way to generate invoice

Downloads

400

Readme

Nice Invoice

An easy and quick way to create an invoice.

:star: Star us on Github — it helps!

:inbox_tray: 5627 Downloads, Checkout on npm-stat.com

Preview - An example invoice

Features

  • Adjust Logo if available
  • Calculate price with quantity
  • Apply and calculate tax

Using unkpg CDN:

<script src="https://unpkg.com/[email protected]/dist/index.js"></script>

How to use it?

Checkout article for instllation or Following are quick steps for installing and using this package,

Step: 01

Install nice invoice package by following command.

npm i nice-invoice

Step: 02

Include package main class into your page

const niceInvoice = require("nice-invoice");

Step: 03

Store your invoice details into variable and then generate it.

const invoiceDetail = {
    shipping: {
      name: "Micheal",
      address: "1234 Main Street",
      city: "Dubai",
      state: "Dubai",
      country: "UAE",
      postal_code: 94111
    },
    items: [
      {
        item: "Chair",
        description: "Wooden chair",
        quantity: 1,
        price: 50.00, 
        tax: "10%"
      },
      {
        item: "Watch",
        description: "Wall watch for office",
        quantity: 2,
        price: 30.00,
        tax: "10%"
      },
      {
        item: "Water Glass Set",
        description: "Water glass set for office",
        quantity: 1,
        price: 35.00,
        tax: ""
      }
    ],
    subtotal: 156,
    total: 156,
    order_number: 1234222,
    header:{
        company_name: "Nice Invoice",
        company_logo: "logo.png",
        company_address: "Nice Invoice. 123 William Street 1th Floor New York, NY 123456"
    },
    footer:{
      text: "This is footer - you can add any text here"
    },
    currency_symbol:"$", 
    date: {
      billing_date: "08 August 2020",
      due_date: "10 September 2020",
    }
};

niceInvoice(invoiceDetail, 'your-invoice-name.pdf');

Optional Parameters

Following parameters you can leave it blank, company_logo: company_logo: "", tax: tax: ""

Contributions

Contributions and suggestions are very welcome and wanted. I try to respond to pull requests within 24 hours, checkout How to contribute

Change Log

You can see change logs by clicking on CHANGELOG.md file.