sindresorhus / Defaults

💾 Swifty and modern UserDefaults
https://swiftpackageindex.com/sindresorhus/Defaults/documentation/defaults
MIT License
1.97k stars 117 forks source link

Add support for `ClosedRange` and `Range` #102

Closed hank121314 closed 2 years ago

hank121314 commented 2 years ago

Summary

Fixes: #98. Create a RangeBridge to support ClosedRange and Range serialization. RangeBridge can serialize the object which protocol conforms to Defaults.RangeSerializable. Defaults.RangeSerializable is a protocol that contains some essential properties for serializing and deserializing ClosedRange and Range.

sindresorhus commented 2 years ago

https://github.com/sindresorhus/Defaults/pull/102#discussion_r870015553

sindresorhus commented 2 years ago

🙌

hank121314 commented 2 years ago

🙌

Thanks for the quick review! As for #101, I will make a separate PR to solve this issue!