The code can be stolen from this repo without any permission and all contributors are welcome but you should refer the link to this repo in your code likes the following.
### in your ~/.bashrc file ###
# the code got from https://github.com/leminhnguyen/useful_snippets
sizeof(){
# example: sizeof BOOK --> result: 895M BOOK/
du -h --max-depth=0 "$1"
}