Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

npm-generatereference

lilia973MIT1.0.5

This generates a unique identifier with a random color. It also can update the prices according to the tax percentage or the discount wanted, and it allows the calculation of the sum of the prices.

npm, generatereference, generatereceipt, receipt, unique string, random color, update price, tax update, sales update, discount price, prices, string, colors, sum, total

readme

  • This enables the user to generate a unique identifier/reference.
  • The result is a concatenation of a random string and the date and time.
  • It is possible to change the number of characters of the random string.
  • The result has also a random color code (from 92 colors).
  • This can also allow the user to update prices due to taxation or to sales.
  • It also allows to sum the total of prices of purcahsed items.

Usage

`javascript

color() //to get a random color reference() //to generate the unique string tax(price, tax%) //to update the price value after taxation sale(price, discount%) //to update the price value after discounts/sales total(array) //to calculate the sum of the prices