Make native module rerequirable.
I'm a node embedder, using node v4.2.4
In my situation,
sometimes, I need to unrequire module.(Which I delete module cache in require.cache).
sometimes, I need to refresh the global object to clean the symbol.
In those case,
the .node library probably loaded before. after unrequire module or refresh global object, I got error like 'non self-register'.
The pure JS module and the buildin module are FINE.
Simple test code:
require('iconv');
delete require.cache["C:\\Program Files (x86)\\nodejs\\node_modules\\iconv\\lib\\iconv.js"];
delete require.cache["C:\Program Files (x86)\nodejs\node_modules\iconv\build\Release\\iconv.node"];
require('iconv');