-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature: mongo Deciamal type #712
Comments
+1 |
how about this? |
1 similar comment
how about this? |
I don't have time to implement it. If any one wants to help, feel free to create PR |
thanks for your reply. sorry I have abit knowledge |
@zhaoyao91, @thearabbit try this: import { Type } from 'meteor/jagi:astronomy'
Type.create {
name: 'Decimal'
class: Decimal
cast: (value) ->
Decimal(value.toString())
validate: (args) ->
Decimal.isDecimal(args)
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To save monetary field, mongo 3.4 has supported NumberDecimal type, and meteor has its package mongo-decimal, which uses the npm package decimal.js, and SimpleSchema supports it by allowing you use
Decimal
as field type.If/How Astronomy supports decimal?
The text was updated successfully, but these errors were encountered: