Skip to content

Commit

Permalink
release: dump v0.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
icyleaf committed Jul 24, 2018
1 parent 40e4b19 commit 0966670
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 6 deletions.
25 changes: 22 additions & 3 deletions CHANGELOG.md
Expand Up @@ -7,7 +7,15 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [Unreleased]

## TODO
> TODO
## 0.1.0 (2018-07-24)

First beta version.

## Add

Provides methods:

- [x] to_int8
- [x] to_int16
Expand All @@ -16,6 +24,17 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- [x] to_float32
- [x] to_float64
- [x] to_bool
- [x] to_time
- [x] to_time(location : Time::Location? = nil, formatters : Array(String)? = nil)

Monkey Patching list:

- String
- Int8/Int16/Int32/Int64
- Float32/Float64
- Bool
- Time
- JSON::Any
- YAML::Any

[Unreleased]: https://github.com/icyleaf/popcorn/compare/25a00baffd41f4ac8a071330038916375904b46d...HEAD
[Unreleased]: https://github.com/icyleaf/popcorn/compare/v0.1.0...HEAD
[0.1.0]: https://github.com/icyleaf/popcorn/compare/25a00baffd41f4ac8a071330038916375904b46d...v0.1.0
15 changes: 12 additions & 3 deletions README.md
Expand Up @@ -23,12 +23,13 @@ Popcorn is easy and safe from one type to another tool.
Popcorn proviedes a handful of `to_xxx`/`to_xxx?` methods and `xxx` is full type name,
This is distinguish between built-in methods in Crystal.

- to_int16
- to_int
- to_int64
- to_float32
- to_float
- to_float64
- to_bool
- to_time
- to_time(location : Time::Location? = nil, formatters : Array(String)? = nil)
- to_string (alias to to_s in Crystal).

```crystal
Expand All @@ -46,7 +47,15 @@ Popcorn.to_time("2018-07-23T10:11:22Z", Time::Location.load("Asia/Shanghai")) #
Popcorn.to_time("Tue, 20 Jan 2018", formatter: ["%a, %d %b %Y"]) # => Time.new(2018, 7, 23, 10, 11, 22, location: Time::Location::UTC)
```

Also these methods had been inject to Crystal literals, you can call it directly, such like:
Also these methods had been inject to Crystal literals, you can call it directly, Monkey Patching list:

- String
- Int8/Int16/Int32/Int64
- Float32/Float64
- Bool
- Time
- JSON::Any
- YAML::Any

```crystal
require "popcorn"
Expand Down

0 comments on commit 0966670

Please sign in to comment.