Comparing version 1.0.16 to 1.0.17
{ | ||
"name": "ofac", | ||
"version": "1.0.16", | ||
"version": "1.0.17", | ||
"description": "A module to facilitate local OFAC searches", | ||
@@ -10,3 +10,4 @@ "main": "index.js", | ||
"version": "", | ||
"postversion": "git push && git push --tags && npm publish" | ||
"postversion": "git push && git push --tags && npm publish && npm run now", | ||
"now": "now --target staging" | ||
}, | ||
@@ -31,2 +32,3 @@ "repository": { | ||
"node-stream-zip": "^1.8.0", | ||
"npm-now": "^1.0.2", | ||
"xml2js": "^0.4.19" | ||
@@ -33,0 +35,0 @@ }, |
@@ -166,2 +166,24 @@ [![npm version](https://badge.fury.io/js/ofac.svg)](https://badge.fury.io/js/ofac) | ||
``` | ||
## NPM-as-a-service on the Now platform | ||
The functionality in this module is also available via a REST API where methods | ||
may be called by passing parameters to the service's url. The parameter "method" is | ||
used to indicate which method to call, and additional parameters should match the | ||
signature of the method, for example: | ||
```bash | ||
curl "https://ofac.npm.now.sh/server.js?method=search&cust={id: 'J287011', country: 'Colombia'}" | ||
``` | ||
returns a JSON object with the method's return value | ||
In Javascript you may use your fevourite package for fetching instead: | ||
```js | ||
const fetch = require('node-fetch') | ||
const url = 'https://ofac.npm.now.sh/server.js?method=search&cust={id: 'J287011', country: 'Colombia'}' | ||
fetch(url).then(res => res.json()) | ||
.then(o => { | ||
console.log(o) // will show the result | ||
}) | ||
``` | ||
## Licence | ||
@@ -168,0 +190,0 @@ MIT |
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
27352
8
319
195
4
+ Addednpm-now@^1.0.2
+ Addednpm-now@1.0.2(transitive)