@stripe/stripe-js 3.0.2 → 3.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -3
- package/dist/index.d.mts +12626 -0
- package/dist/index.d.ts +12626 -0
- package/dist/stripe.js +1 -1
- package/dist/stripe.mjs +1 -1
- package/package.json +5 -26
- package/pure/index.d.mts +12626 -0
- package/pure/index.d.ts +12626 -0
- package/{dist/pure.js → pure/index.js} +1 -1
- package/{dist/pure.mjs → pure/index.mjs} +1 -1
- package/types/.eslintrc.yml +0 -3
- package/types/api/bank-accounts.d.ts +0 -61
- package/types/api/cards.d.ts +0 -130
- package/types/api/financial-connections.d.ts +0 -232
- package/types/api/index.d.ts +0 -11
- package/types/api/orders.d.ts +0 -122
- package/types/api/payment-intents.d.ts +0 -330
- package/types/api/payment-methods.d.ts +0 -452
- package/types/api/setup-intents.d.ts +0 -184
- package/types/api/shared.d.ts +0 -125
- package/types/api/sources.d.ts +0 -1045
- package/types/api/tokens.d.ts +0 -639
- package/types/api/verification-sessions.d.ts +0 -9
- package/types/index.d.mts +0 -17
- package/types/index.d.ts +0 -17
- package/types/pure.d.mts +0 -5
- package/types/pure.d.ts +0 -5
- package/types/stripe-js/checkout.d.ts +0 -153
- package/types/stripe-js/custom-checkout.d.ts +0 -220
- package/types/stripe-js/elements/address.d.ts +0 -261
- package/types/stripe-js/elements/affirm-message.d.ts +0 -65
- package/types/stripe-js/elements/afterpay-clearpay-message.d.ts +0 -119
- package/types/stripe-js/elements/apple-pay.d.ts +0 -156
- package/types/stripe-js/elements/au-bank-account.d.ts +0 -138
- package/types/stripe-js/elements/base.d.ts +0 -264
- package/types/stripe-js/elements/card-cvc.d.ts +0 -119
- package/types/stripe-js/elements/card-expiry.d.ts +0 -119
- package/types/stripe-js/elements/card-number.d.ts +0 -200
- package/types/stripe-js/elements/card.d.ts +0 -226
- package/types/stripe-js/elements/cart.d.ts +0 -224
- package/types/stripe-js/elements/eps-bank.d.ts +0 -140
- package/types/stripe-js/elements/express-checkout.d.ts +0 -446
- package/types/stripe-js/elements/fpx-bank.d.ts +0 -134
- package/types/stripe-js/elements/iban.d.ts +0 -135
- package/types/stripe-js/elements/ideal-bank.d.ts +0 -140
- package/types/stripe-js/elements/index.d.ts +0 -22
- package/types/stripe-js/elements/issuing/index.d.ts +0 -5
- package/types/stripe-js/elements/issuing/issuing-card-copy-button.d.ts +0 -37
- package/types/stripe-js/elements/issuing/issuing-card-cvc-display.d.ts +0 -32
- package/types/stripe-js/elements/issuing/issuing-card-expiry-display.d.ts +0 -32
- package/types/stripe-js/elements/issuing/issuing-card-number-display.d.ts +0 -40
- package/types/stripe-js/elements/issuing/issuing-card-pin-display.d.ts +0 -32
- package/types/stripe-js/elements/link-authentication.d.ts +0 -158
- package/types/stripe-js/elements/p24-bank.d.ts +0 -140
- package/types/stripe-js/elements/payment-method-messaging.d.ts +0 -98
- package/types/stripe-js/elements/payment-request-button.d.ts +0 -151
- package/types/stripe-js/elements/payment.d.ts +0 -275
- package/types/stripe-js/elements/shipping-address.d.ts +0 -215
- package/types/stripe-js/elements-group.d.ts +0 -1129
- package/types/stripe-js/embedded-checkout.d.ts +0 -30
- package/types/stripe-js/ephemeral-keys.d.ts +0 -3
- package/types/stripe-js/financial-connections.d.ts +0 -19
- package/types/stripe-js/index.d.ts +0 -13
- package/types/stripe-js/orders.d.ts +0 -9
- package/types/stripe-js/payment-intents.d.ts +0 -1465
- package/types/stripe-js/payment-request.d.ts +0 -529
- package/types/stripe-js/setup-intents.d.ts +0 -250
- package/types/stripe-js/stripe.d.ts +0 -1472
- package/types/stripe-js/token-and-sources.d.ts +0 -110
- package/types/utils.d.ts +0 -2
package/README.md
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
# Stripe.js ES
|
|
1
|
+
# Stripe.js as a CommonJS module or ES module
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
This package allows [Stripe.js](https://stripe.com/docs/stripe-js) to be
|
|
4
|
+
imported as a CommonJS module or ES module.
|
|
4
5
|
|
|
5
6
|
**Note**: To be
|
|
6
7
|
[PCI compliant](https://stripe.com/docs/security/guide#validating-pci-compliance),
|
|
@@ -19,6 +20,7 @@ of features of Stripe.js.
|
|
|
19
20
|
## Minimum requirements
|
|
20
21
|
|
|
21
22
|
- Node.js: v12.16
|
|
23
|
+
- TypeScript: v.3.1.1
|
|
22
24
|
|
|
23
25
|
## Installation
|
|
24
26
|
|
|
@@ -116,9 +118,12 @@ one. When you call `loadStripe`, it will use the existing script tag.
|
|
|
116
118
|
|
|
117
119
|
If you would like to use `loadStripe` in your application, but defer loading the
|
|
118
120
|
Stripe.js script until `loadStripe` is first called, use the alternative
|
|
119
|
-
`@stripe/stripe-js/pure` import
|
|
121
|
+
`@stripe/stripe-js/pure` import module:
|
|
120
122
|
|
|
121
123
|
```js
|
|
124
|
+
// CommonJS module import
|
|
125
|
+
const {loadStripe} = require('@stripe/stripe-js/pure');
|
|
126
|
+
// ES module import
|
|
122
127
|
import {loadStripe} from '@stripe/stripe-js/pure';
|
|
123
128
|
|
|
124
129
|
// Stripe.js will not be loaded until `loadStripe` is called
|
|
@@ -132,6 +137,9 @@ If you would like to
|
|
|
132
137
|
altogether, use `loadStripe.setLoadParameters`:
|
|
133
138
|
|
|
134
139
|
```js
|
|
140
|
+
// CommonJS module import
|
|
141
|
+
const {loadStripe} = require('@stripe/stripe-js/pure');
|
|
142
|
+
// ES module import
|
|
135
143
|
import {loadStripe} from '@stripe/stripe-js/pure';
|
|
136
144
|
|
|
137
145
|
loadStripe.setLoadParameters({advancedFraudSignals: false});
|