Last active
July 17, 2018 10:18
-
-
Save AdityaChaudhary/e50a52e806e172f6f159f5314eca468c to your computer and use it in GitHub Desktop.
Serialize a function in Node.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var serialize = require('node-serialize'); | |
| x = { | |
| test : function(){ return 'hi'; } | |
| }; | |
| console.log("Serialized: \n" + serialize.serialize(x)); | |
| /* | |
| "_$$ND_FUNC$$_function (){ return 'hi'; }()" | |
| */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment