Skip to content

Commit

Permalink
support other stores in .each
Browse files Browse the repository at this point in the history
  • Loading branch information
jfromaniello committed May 4, 2018
1 parent e2dbcec commit f5a9fcd
Show file tree
Hide file tree
Showing 3 changed files with 95 additions and 4 deletions.
14 changes: 12 additions & 2 deletions lib/each.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

73 changes: 73 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 10 additions & 2 deletions src/each.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,16 @@ Enumerate system root CAs synchronously
###
crypt = require './crypt32'

module.exports = (cb)->
store = crypt.CertOpenSystemStoreA null, 'ROOT'
module.exports = (storeName, cb)->
if typeof storeName == 'function'
cb = storeName
storeName = 'ROOT'

if Array.isArray(storeName)
storeName.forEach (sn) -> module.exports sn, cb
return;

store = crypt.CertOpenSystemStoreA null, storeName
try
ctx = null
while 1
Expand Down

0 comments on commit f5a9fcd

Please sign in to comment.