Cows. Lots of cows!
I’m proud to announce the most amazing and magical release yet: Noze.io 0.2.10 Cows. With a lot of hard work (and a sweating Swift3 compiler) we managed to include over 400 very nice cows into the Noze.io framework.
Starting today Noze.io doesn’t only come with Rechargables Included but with plenty of beef as well! As usual you only gets those 🐮s if you actually link to them. No need to be afraid of the sheer amount of meat provided. And vegetarians are very welcome too! (No cow was harmed during the production of this feature, what your code does with them is up to you)
(__) |\/|(oo) /--| \--\/ / | || * ||----|| ^^ ^^ Cow bird
Now you are probably thinking:
Wicked! I also want to use cows in my code, how do I do that?!!
Good that you ask, to get access to all cows:
import cows
for cow in cows.allCows {
print("Cow:\n\(cow)\n")
}
To pick a random cow, use vaca
, e.g. in combination with Mustache templates:
import cows
app.get("/") { req, res, _ in
res.render("index", [ "cowOfTheDay": cows.vaca() ])
}
and then:
<pre>{{cowOfTheDay}}</pre>
The express-simple example cowardly demonstrates this feature.
Credit where credit is due!
This is just a Swift port of the excellent cows and vaca modules of Sindre Sorhus. He did all the herding and cowboy’ing.
Changes in 0.2.10 (from 0.2.8)
stream
module- Major bugfix: some sourcecode was wider than 78 chars, hard to believe the code actually compiled! 🙄
- fix to flush callback of
Transform
streams: was ignoring the data passed into it
http
module- make the
cookies.reset
method Swift version agnostic - fixed an EOF related bug in the
HTTPConnection
- make the
json
module- does not bark on empty JSON input anymore
- new
cows
module todo-mvc
- supports order property
- now fully passes the todo-backend JS spec
Getting the stuff
Well, as usual, head over to
GitHub
and checkout the master
branch or fetch the 0.2.10
tag.
Happy cow-zing!
hh