New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@drivekyte/currency-utils

Package Overview
Dependencies
Maintainers
6
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@drivekyte/currency-utils - npm Package Compare versions

Comparing version 1.0.0 to 1.1.0

dist/lib/use-currency-formatter.test.js

2

dist/currency-utils.es5.js

@@ -1,2 +0,2 @@

const r=()=>{const r=new Intl.NumberFormat("en-US",{style:"currency",currency:"USD"});return e=>r.format(e)};export{r as default};
const r=r=>{const e=new Intl.NumberFormat("en-US",{style:"currency",currency:null!=r?r:"USD"});return r=>e.format(r)};export{r as default};
//# sourceMappingURL=currency-utils.es5.js.map

@@ -1,2 +0,2 @@

"use strict";module.exports=()=>{const r=new Intl.NumberFormat("en-US",{style:"currency",currency:"USD"});return e=>r.format(e)};
"use strict";module.exports=r=>{const e=new Intl.NumberFormat("en-US",{style:"currency",currency:null!=r?r:"USD"});return r=>e.format(r)};
//# sourceMappingURL=currency-utils.umd.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const useCurrencyFormatter = () => {
const useCurrencyFormatter = (currency) => {
const formatFn = new Intl.NumberFormat('en-US', {
style: 'currency',
currency: 'USD',
currency: currency !== null && currency !== void 0 ? currency : 'USD',
});

@@ -8,0 +8,0 @@ return (value) => formatFn.format(value);

@@ -1,1 +0,1 @@

export { default } from './use-currency-formatter';
export { default, Currency } from './use-currency-formatter';

@@ -1,2 +0,3 @@

declare const useCurrencyFormatter: () => (value: number) => string;
export declare type Currency = 'USD' | 'CAD';
declare const useCurrencyFormatter: (currency?: Currency | undefined) => (value: number) => string;
export default useCurrencyFormatter;
{
"name": "@drivekyte/currency-utils",
"version": "1.0.0",
"version": "1.1.0",
"description": "",

@@ -31,37 +31,12 @@ "keywords": [],

"report-coverage": "cat ./coverage/lcov.info | coveralls",
"semantic-release-prepare": "ts-node tools/semantic-release-prepare",
"semantic-release": "semantic-release",
"test:ci": "jest --ci --bail --coverage --silent",
"test:coverage": "jest --coverage --silent",
"test:watch": "jest --watch",
"type:check": "tsc --noEmit"
"type:check": "tsc --noEmit",
"test": "jest"
},
"jest": {
"transform": {
".(ts|tsx)": "ts-jest"
},
"testEnvironment": "node",
"testRegex": "(/__tests__/.*|\\.(test|spec))\\.(ts|tsx|js)$",
"moduleFileExtensions": [
"ts",
"tsx",
"js"
],
"coveragePathIgnorePatterns": [
"/node_modules/",
"/test/"
],
"coverageThreshold": {
"global": {
"branches": 90,
"functions": 95,
"lines": 95,
"statements": 95
}
},
"collectCoverageFrom": [
"src/*.{js,ts}"
]
},
"devDependencies": {
"@babel/preset-env": "^7.15.0",
"@babel/preset-react": "^7.14.5",
"@babel/preset-typescript": "^7.15.0",
"@drivekyte/eslint-config": "^5.1.1",

@@ -71,4 +46,5 @@ "@drivekyte/prettier-config": "^4.0.0",

"@rollup/plugin-node-resolve": "^13.0.4",
"@testing-library/react-hooks": "^7.0.1",
"@types/jest": "^26.0.24",
"@types/node": "^16.4.2",
"@types/node": "^16.6.2",
"audit-ci": "^3.1.1",

@@ -80,3 +56,3 @@ "colors": "^1.4.0",

"husky": "^4.3.8",
"jest": "^26.0.24",
"jest": "^27.5.1",
"jest-config": "^27.0.6",

@@ -86,12 +62,13 @@ "lint-staged": "^10.5.3",

"prompt": "^1.1.0",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-test-renderer": "^17.0.2",
"replace-in-file": "^6.2.0",
"rimraf": "^3.0.2",
"rollup": "^2.53.3",
"rollup": "^2.56.2",
"rollup-plugin-json": "^4.0.0",
"rollup-plugin-terser": "^7.0.2",
"rollup-plugin-typescript2": "^0.30.0",
"semantic-release": "^17.4.4",
"shelljs": "^0.8.4",
"ts-jest": "^27.0.4",
"ts-node": "^10.0.1",
"ts-jest": "^27.0.5",
"ts-node": "^10.2.1",
"typescript": "^4.1.3"

@@ -115,3 +92,8 @@ },

},
"dependencies": {}
"dependencies": {
"minimist": "^1.2.6"
},
"resolutions": {
"minimist": "^1.2.6"
}
}

@@ -1,13 +0,61 @@

# Kyte Library Generator
# Currency utils
A starter project that makes creating a TypeScript library extremely easy.
[![pipeline status](https://git.drivekyte.com/kytecoredevelopers/currency-utils/badges/master/pipeline.svg)](https://git.drivekyte.com/kytecoredevelopers/currency-utils/-/commits/master)
[![coverage report](https://git.drivekyte.com/kytecoredevelopers/currency-utils/badges/master/coverage.svg)](https://git.drivekyte.com/kytecoredevelopers/currency-utils/-/commits/master)
Default currency formatters for frontend.
## Installation
Run
```bash
yarn add @drivekyte/currency-utils
```
## Usage
```typescript
import useCurrencyUtils from '@drivekyte/currency-utils';
const Foo = () => {
const formatCurrency = useCurrencyUtils();
return <>{formatCurrency(20)}</>;
};
```
## Contributing
Contributions to this project are welcome. After cloning the repo, use the following instructions:
### Installing dependencies
```bash
git clone https://git.drivekyte.com/frontend/library-generator.git YOURFOLDERNAME
cd YOURFOLDERNAME
# Run yarn install and write your library name when asked. That's all!
yarn install
```
### Running locally
```bash
yarn dev
```
### Running tests
```bash
yarn test:watch
```
### Deploying into NPM
We've a CI/CD for publishing automatically to NPM once a branch is merged into master. The step to publish to NPM should be manually triggered. Make sure to bump the package version before.
### Deploying locally
We use `yalc` in order to deploy and test locally.
```bash
yarn publish:local
```

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc