Last active
November 18, 2022 12:21
-
-
Save jgphilpott/f63570f980f7b6b09067846754a90bc6 to your computer and use it in GitHub Desktop.
A simple function to get the ruff size of an object.
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
byteSize = (obj) -> | |
return JSON.stringify(obj).length |
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
// Generated by CoffeeScript 2.7.0 | |
var byteSize; | |
byteSize = function(obj) { | |
return JSON.stringify(obj).length; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment