Socket
Socket
Sign inDemoInstall

nuke-helper

Package Overview
Dependencies
1
Maintainers
2
Versions
58
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    nuke-helper

辅助函数


Version published
Weekly downloads
12
decreased by-61.29%
Maintainers
2
Install size
87.1 kB
Created
Weekly downloads
 

Readme

Source

Helper

  • category: Components
  • chinese: 辅助函数
  • type: 基本

API

calcTextSize

解析固定字号,<Text style={{fontSize: 28}}>123</Text> 希望字号被解析为:

web: 14px;
native iOS: 14 dp;
native android: 14 pt; 
const { calcTextSize } = Helper;
let style = {fontSize: 28};
calcTextSize(style);

hairLine for web

const { hairLine } = Helper;
hairLine.detect() // 是否支持 hairline,返回 true 或 false
hairLine.fixBorder({ borderWidth: 1 }) // ==> {"borderWidth":"0.5px"}

Keywords

FAQs

Last updated on 26 Sep 2019

Did you know?

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

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc