commodo-fields-float
A simple float field, used with the Commodo withFields
higher order function.
Install
npm install --save commodo-fields-float
Or if you prefer yarn:
yarn add commodo-fields-float
Quick Example:
;;; const Company = ; const company = ;companyname = "Acme Corporation"; // The float field can only accepts floats. companygrowth = 565;companypastGrowths = 563 399 9542 10; // The following will throw the WithFieldsError error.companygrowth = "5.65";companypastGrowths = 563 399 "9.542" 10;
Note: alternatively, you could've also used the populate
method to assign the data:
const company = ;companypopulate = growth: 565 pastGrowths: 563 399 9542 10 ;
Contributors
Thanks goes to these wonderful people (emoji key):
Adrian Smijulj 💻 📖 💡 👀 ⚠️ |
---|
This project follows the all-contributors specification. Contributions of any kind welcome!