Comparing version 3.0.1 to 3.0.2
{ | ||
"name": "dominos", | ||
"version": "3.0.1", | ||
"version": "3.0.2", | ||
"description": "node js API for Domino's pizza", | ||
@@ -26,3 +26,3 @@ "exports": "./index.js", | ||
"vanilla-test": "^1.4.7", | ||
"xml2json": "^0.9.0" | ||
"xml2json": "^0.12.0" | ||
}, | ||
@@ -29,0 +29,0 @@ "devDependencies": { |
@@ -65,3 +65,3 @@ # Domino's Pizza API | ||
import {Order,Customer,Item,Payment,NearbyStores} from '../index.js'; | ||
import {Order,Customer,Item,Payment,NearbyStores} from 'dominos'; | ||
@@ -197,2 +197,48 @@ //extra cheese thin crust pizza | ||
# Legacy CommonJS support | ||
This is for those who wish to use the `domnios api` in older code bases still using `require`. While node v12+ is still required, see the detailed info and order example in [CommonJS.md](https://github.com/RIAEvangelist/node-dominos-pizza-api/blob/master/docs/CommonJS.md) for how to include and use the module in your code. | ||
```js | ||
(async () => { | ||
const dominos=await import('dominos'); | ||
//importing variables into the global like this just allows us to use the same code | ||
//from the ESM implementation for the commonJS implementation | ||
//This is the same as an ESM import of | ||
//import {Address,NearbyStores,Store,Menu,Customer,Item,Image,Order,Payment,Tracking,urls,IsDominos} from 'dominos' | ||
Object.assign(global,dominos); | ||
//need to await dominos promise completion | ||
//because ES6 is async by nature | ||
start(); | ||
})() | ||
function start(){ | ||
//any of the ESM examples from the other docs will work as is here | ||
//because we mimiced an ESM import above. | ||
const n='\n'; | ||
console.log( | ||
n, | ||
Address,n, | ||
NearbyStores,n, | ||
Store,n, | ||
Menu,n, | ||
Customer,n, | ||
Item,n, | ||
Image,n, | ||
Order,n, | ||
Payment,n, | ||
Tracking,n, | ||
urls,n, | ||
IsDominos,n | ||
); | ||
} | ||
``` | ||
--- | ||
@@ -199,0 +245,0 @@ |
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
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
716
68711
26
1189
+ Addedhoek@5.0.46.1.3(transitive)
+ Addedisemail@3.2.0(transitive)
+ Addedjoi@13.7.0(transitive)
+ Addedtopo@3.0.3(transitive)
+ Addedxml2json@0.12.0(transitive)
- Removedisemail@2.2.1(transitive)
- Removeditems@2.2.1(transitive)
- Removedjoi@9.2.0(transitive)
- Removedmoment@2.30.1(transitive)
- Removedtopo@2.1.1(transitive)
- Removedxml2json@0.9.2(transitive)
Updatedxml2json@^0.12.0