Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

couponable

Package Overview
Dependencies
Maintainers
2
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

couponable - npm Package Compare versions

Comparing version 6.0.1 to 7.0.0

dist/index.d.ts

26

package.json
{
"name": "couponable",
"description": "Helper functions for dealing with coupons.",
"version": "6.0.1",
"version": "7.0.0",
"author": "Chris McC",

@@ -11,5 +11,27 @@ "license": "MIT",

},
"main": "./dist/index.js",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"exports": {
".": {
"require": "./dist/index.js",
"import": "./dist/index.mjs",
"types": "./dist/index.d.ts"
}
},
"files": [
"dist"
],
"scripts": {
"test": "jest",
"prepare": "npm run build",
"build": "tsup src/index.ts --format cjs,esm --dts --clean"
},
"devDependencies": {
"mocha": "*"
"@types/jest": "^27.5.2",
"jest": "^28.1.0",
"ts-jest": "^28.0.3",
"tsup": "^6.0.1",
"typescript": "^4.7.2"
}
}

19

Readme.md

@@ -7,8 +7,15 @@ ## couponable

```js
var couponable = require('couponable');
couponable.discountable(amountInCents, percentOff, amountOffInCents);
couponable.totalDueNow(orderItem);
couponable.totalRecurring(orderItem);
couponable.totalLineOne(orderItem);
couponable.totalLineTwo(orderItem);
import {
discountable,
totalDueNow,
totalRecurring,
totalLineOne,
totalLineTwo
} from 'couponable';
discountable(amountInCents, percentOff, amountOffInCents);
totalDueNow(orderItem);
totalRecurring(orderItem);
totalLineOne(orderItem);
totalLineTwo(orderItem);
```
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