This library is not suitable in production, and should be considered alpha level software.
- Support calling js functions atached to js objects from crystal.
- Add propper docs to classes
- Explain jsprop
- Allow wildcard getProperty and setProperty calls
- Allow single functions to be dropped into js without requiring manual class handling (let top level functions be turned into js objects)
- handle type restrictions and automatic? type conversion
- Use callbacks definitions to dispatch arguments instead of having them shoved into an array
Add this to your application's
dependencies: crjsc: github: bmmcginty/crjsc
All of the following should be performed from the root of this repository.
- To build, run
- To test, run
- To run the example(s), run
It will also be symlinked to
jscore for quicker access.
Make changes in
src/crjsc/lib.cr or the appropriate file.
- All JSObjects are (interchangeable) JSValues.
- Not all JSValues are JSObjects. Use
value_is_objectto check this.
- If you are accessing a complex JS object from Crystal, use the obj[name] and obj[name]=value method to access and mutate properties/functions of that object.
- Fork it ( https://github.com/bmmcginty/crjsc/fork )
- Create your feature branch (git checkout -b my-new-feature)
- Commit your changes (git commit -am 'Add some feature')
- Push to the branch (git push origin my-new-feature)
- Create a new Pull Request
- bmmcginty Brandon McGinty-Carroll - creator, maintainer