base64_value
Lazy Base64Value wrapper
Installation
-
Add the dependency to your
shard.yml
:dependencies: base64_value: github: lost22git/base64_value.cr
-
Run
shards install
Usage
require "base64_value"
base64_value = Base64Value.parse "Y3J5c3RhbA=="
# or
# base64_value = Base64Value.from_bytes UInt8.static_array(99, 114, 121, 115, 116, 97, 108).to_slice
# or
# base64_value = Base64Value.from_plain "crystal"
puts base64_value.to_s # => "Y3J5c3RhbA=="
puts base64_value.to_bytes # => Bytes[99, 114, 121, 115, 116, 97, 108]
puts base64_value.to_plain # => crystal
Development
Run tests
crystal spec --progress
Contributing
- Fork it (https://github.com/lost22git/base64_value.cr/fork)
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request
Contributors
- lost - creator and maintainer