couponable
Advanced tools
Comparing version 6.0.1 to 7.0.0
{ | ||
"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" | ||
} | ||
} |
@@ -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); | ||
``` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
21
9352
5
5
249
2