Project

usamin-js

0.0
No release in over a year
A RapidJSON-based JavaScript object generator for Ruby.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

 Project Readme

UsaminJs

JavaScript generator based on RapidJSON.

Installation

Install RapidJSON beforehand. Only header files are necessary, and no need to build.

Next, add this line to your application's Gemfile:

gem 'usamin-js'

And then execute:

$ bundle

Or install it yourself as:

$ gem install usamin-js

The directory of RapidJSON can be explicitly specified with --with-rapidjson-dir option.

$ gem install usamin-js -- --with-rapidjson-dir=/usr/local/opt/rapidjson

Usage

require 'usamin/js'

puts Usamin::Js.generate({ abe: 'nana', time: Time.now, "3": 5 })
#=> {"abe":"nana","time":new Date(1655617665882),"3":5}

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/Ishotihadus/usamin-js.

License

The gem is available as open source under the terms of the MIT License at the request of RapidJSON.