UNPKG

xinput-ffi

Version:

Access native XInput functions as well as some helpers based around them.

16 lines (12 loc) 350 B
/* Copyright (c) Anthony Beaumont This source code is licensed under the MIT License found in the LICENSE file in the root directory of this source tree. */ function bitwise(code, list) { const result = []; for (const [value, name] of Object.entries(list)) if (code & value) result.push(name); return result; } export { bitwise };