Skip to content

Commit de705b2

Browse files
committed
Restrict npm publish through "files"
1 parent 1f352fd commit de705b2

2 files changed

Lines changed: 9 additions & 3 deletions

File tree

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Initialize a client (see [ClientConstructorOptions](/usage.md#ClientConstructorO
1414

1515
```js
1616
const NyplClient = require('@nypl/nypl-data-api-client')
17-
var client = new NyplClient({
17+
const client = new NyplClient({
1818
base_url: 'http://[FQDN].com/api/v0.1/',
1919
oauth_key: 'oauth-key',
2020
oauth_secret 'top-secret-oauth-secret',
@@ -59,8 +59,8 @@ To get patron id `12345678` (note you must auth with an account that has the 're
5959
const pType = Object.keys(patron.fixedFields).map((key) => patron.fixedFields[key])
6060
.filter((fixed) => fixed.label === 'Patron Type')[0]
6161
.value
62-
var name = patron.names[0]
63-
var barcode = patron.barCodes[0]
62+
const name = patron.names[0]
63+
const barcode = patron.barCodes[0]
6464

6565
console.log('Patron:')
6666
console.log(' Name: ' + name)

package.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,12 @@
2727
"sinon": "^17.0.1",
2828
"standard": "^17.1.0"
2929
},
30+
"files": [
31+
"bin/",
32+
"index.js",
33+
"lib/client.js",
34+
"lib/errors.js"
35+
],
3036
"standard": {
3137
"globals": [
3238
"expect",

0 commit comments

Comments
 (0)