https://github.com/shime/i_did_mean
Did you mean? I did mean! Autofix your typos!
https://github.com/shime/i_did_mean
Last synced: 11 months ago
JSON representation
Did you mean? I did mean! Autofix your typos!
- Host: GitHub
- URL: https://github.com/shime/i_did_mean
- Owner: shime
- License: mit
- Created: 2019-12-28T11:13:28.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-02-07T15:54:20.000Z (over 6 years ago)
- Last Synced: 2025-06-14T02:19:21.112Z (about 1 year ago)
- Language: Ruby
- Size: 27.3 KB
- Stars: 6
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# i_did_mean [](https://travis-ci.org/shime/i_did_mean)
[Did you mean](https://github.com/ruby/did_you_mean)? I did mean!
Autocorrects spelling mistakes reported by DidYouMean. Only attempts to autocorrect when there is a single suggestion from DidYouMean.
## Example
This code:
```ruby
require "i_did_mean"
def bar
"foo"
end
ba
```
Will get autocorrected to:
```ruby
require "i_did_mean"
def bar
"foo"
end
bar
```
This code:
```ruby
require "i_did_mean"
first_name = nil
flrst_name
```
Will get autocorrected to:
```ruby
require "i_did_mean"
first_name = nil
first_name
```
This code:
```ruby
require "i_did_mean"
hash = { "foo" => 1, bar: 2 }
hash.fetch(:bax)
```
Will get autocorrected to:
```ruby
require "i_did_mean"
hash = { "foo" => 1, bar: 2 }
hash.fetch(:bar)
```
For more examples, check out the [test directory](https://github.com/shime/i_did_mean/tree/master/test).
## License
Copyright (c) 2019 Hrvoje Simic. See LICENSE for further details.