base64_value.cr

Lazy Base64Value wrapper

base64_value

Lazy Base64Value wrapper

API DOC

Installation

  1. Add the dependency to your shard.yml:

    dependencies:
      base64_value:
        github: lost22git/base64_value.cr
    
  2. 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

  1. Fork it (https://github.com/lost22git/base64_value.cr/fork)
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Contributors

  • lost - creator and maintainer
Repository

base64_value.cr

Owner
Statistic
  • 0
  • 0
  • 0
  • 0
  • 0
  • 3 months ago
  • June 9, 2024
License

MIT License

Links
Synced at

Sun, 15 Sep 2024 19:53:41 GMT

Languages