New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

express-java-monetary-amount-deserializer

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

express-java-monetary-amount-deserializer

A express middleware module for deserializing Javas MonetaryAmount object

latest
Source
npmnpm
Version
1.0.6
Version published
Maintainers
1
Created
Source

express-java-monetary-amount-deserializer

A express middleware module for deserializing Javas MonetaryAmount object

Usage

import deserializeMonetary from 'express-java-monetary-amount-deserializer'
let app = express()
app.use(deserializeMonetary)

Example flat

Input

{
  sum: "GBP 100.00"
}

Output:

{
  sum: {
    amount: 100
    currency: "GBP"
  }
}

Example nested

Input

{
  goods_list: [
     { 
        title: "item 1",
        price: "EUR 10.50",
     },
     { 
        title: "item 2",
        price: "EUR 25.99",
     }
  ]
}

Output:

{
  goods_list: [
     { 
        title: "item 1",
        price: {
           amount: 10.5,
           currency: "EUR"
        }
     },
     { 
        title: "item 2",
        price: {
           amount: 25.99,
           currency: "EUR"
        }
     }
  ]
}

FAQs

Package last updated on 10 Mar 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts