https://github.com/denolfe/masked-string
Simple masked string wrapper class
https://github.com/denolfe/masked-string
Last synced: 12 days ago
JSON representation
Simple masked string wrapper class
- Host: GitHub
- URL: https://github.com/denolfe/masked-string
- Owner: denolfe
- License: mit
- Created: 2019-07-19T04:17:38.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2019-07-31T21:05:06.000Z (almost 7 years ago)
- Last Synced: 2025-09-02T19:44:06.751Z (10 months ago)
- Language: Crystal
- Homepage: https://denolfe.github.io/masked-string/
- Size: 19.5 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Masked String
Simple masked string wrapper class. Once instantiated, the unmasked value cannot be accessed. Normal methods like `==`, `+`, and `to_s` are handled as well.
## Installation
1. Add the dependency to your `shard.yml`:
```yaml
dependencies:
masked_string:
github: denolfe/masked-string
```
2. Run `shards install`
## Usage
```crystal
require "masked_string"
masked = Masked::Str.new("123456789", 4)
masked.value #=> "*****6789"
masked.to_s #=> "*****6789"
```
## Contributing
1. Fork it ()
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
- [Elliot DeNolf](https://github.com/denolfe) - creator and maintainer