Is a Costco membership worth it as a single person with no kids?

I’ve always wanted to buy a membership but I always find that I never need to buy in bulk. I’ve found that in the past a lot of the food items I buy will go bad because I can’t eat that much as a single person. But there are some non perishable items like toiletries, laundry detergent, etc. that would be nice to have. Is it worth it only for non perishable items?