Change end event behavior (readers field is updated before the edn event is emitted)

Add types field to package.json
This commit is contained in:
Martin Endler
2018-12-28 04:20:50 +01:00
parent 0fa39f7140
commit d2aa4498ca
2 changed files with 2 additions and 1 deletions

View File

@@ -67,8 +67,8 @@ module.exports = function () {
r.on('_end', function () { r.on('_end', function () {
r.removeAllListeners('status'); r.removeAllListeners('status');
r.emit('end');
delete readers[name]; delete readers[name];
r.emit('end');
}); });
readers[name] = r; readers[name] = r;

View File

@@ -29,6 +29,7 @@
} }
], ],
"main": "lib/pcsclite.js", "main": "lib/pcsclite.js",
"types": "index.d.ts",
"directories": { "directories": {
"test": "test" "test": "test"
}, },