question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Feature Request: Add function to preprocess amount

See original GitHub issue

My project uses a lot of dollar amounts but they are all stored on the server as “in cents.” ie. $10.00 would be stored as 1000.

Currently, I have to pass these amounts through two filters, one to convert the amount from “in cents” to “in dollars” before passing it into the currency filter. It would be nice to be able to provide the currency filter config a function to do this.

Example:

Vue.use(VueCurrencyFilter, {
  symbol: "$",
  thousandsSeparator: ",",
  fractionCount: 2,
  fractionSeparator: ".",
  symbolSpacing: false,
  convert: function (amount) { return amount / 100 }
})

If you feel this is within the scope of the vue-currency-filter, and I would understand if you don’t feel it is, I would be happy to give this shot and send you a pull request.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:5
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
dsfx3dcommented, Sep 6, 2020

The project has great utility for some use cases but we need to work on the code quality as well to maintain a good developer experience for all potential contributors. Should I make a PR with a linting set up first? There are lint errors in almost all modules.

1reaction
dsfx3dcommented, Sep 5, 2020

@mazipan Is this feature still open for a PR?

Read more comments on GitHub >

github_iconTop Results From Across the Web

[FEATURE REQUEST] Support for python preprocessing #663
I wanted to use tensor flow serve to create a restful service where i pass a bunch of text inputs in the rest...
Read more >
Manual feature preprocessing | BigQuery ML - Google Cloud
BigQuery ML supports the TRANSFORM clause for you to define custom preprocessing using the preprocessing functions on this page.
Read more >
Preprocess - Hugging Face
A tokenizer splits text into tokens according to a set of rules. The tokens are converted into numbers and then tensors, which become...
Read more >
Preprocess input data before making predictions using ...
This container will input the processed dataset and train a model to predict the age of a given abalone based on the (processed)...
Read more >
What Is Data Preprocessing? 4 Crucial Steps to Do It Right
Data preprocessing is a data mining process that transforms raw ... The number of features or input variables of a dataset is called...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found