🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

@fintory/utils

Package Overview
Dependencies
Maintainers
2
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fintory/utils

Utilities we are internally using at Fintory

latest
npmnpm
Version
0.4.0
Version published
Maintainers
2
Created
Source

@fintory/utils

Available utilities

dynamicFontSize

Example usage:

import { fontSize } from '@fintory/utils'
// or `import fontSize from '@fintory/utils/es/dynamicFontSize'`

fontSize(16) // returns a css literal that can be used in `styled-components`
fontSize(16, 1.6) // also returns a css literal

Hint: You may only use the fontSize method, if you are also using styled-components. Otherwise, you can just use the generateFontSize function, which is also exported and can be used like this:

import { generateFontSize } from '@fintory/utils'
// or `import { generateFontSize } from '@fintory/utils/es/dynamicFontSize'`

generateFontSize(16) // returns an object which can be used in any CSS-in-JS toolkit
generateFontSize(16, 1.6) // also returns an object

Usage of only some parts of the package

To enable tree-shaking for specific parts of your application, you may need to scope the package a little more like @fintory/utils/es/dynamicFontSize instead of @fintory/utils (with spread).

FAQs

Package last updated on 29 Sep 2020

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