weakable
A Node.js module that returns true if a value can be used as a WeakSet item or a WeakMap key.
Installation
npm install weakable --save
Usage
const weakable = const set = const obj = {} // trueset const str = 'test' // falseset // Uncaught TypeError: Invalid value used in weak set