UNPKG

@strongnguyen/oidc-provider

Version:

OAuth 2.0 Authorization Server implementation for Node.js with OpenID Connect

11 lines (9 loc) 243 B
module.exports = (object, predicate) => { const result = {}; Object.entries(object).forEach(([key, value]) => { if (predicate(value, key)) { // TODO: swap predicate arguments result[key] = value; } }); return result; };