Gathering detailed insights and metrics for @fluentui-react-native/merge-props
Gathering detailed insights and metrics for @fluentui-react-native/merge-props
npm install @fluentui-react-native/merge-props
Typescript
Module System
Node Version
NPM Version
TypeScript (91.11%)
JavaScript (4.78%)
Objective-C (1.56%)
Swift (0.94%)
C++ (0.83%)
Ruby (0.25%)
Kotlin (0.25%)
PowerShell (0.18%)
Shell (0.09%)
C (0.02%)
Total Downloads
175,219
Last Day
553
Last Week
1,214
Last Month
8,745
Last Year
75,891
1,319 Stars
4,601 Commits
163 Forks
44 Watching
44 Branches
10,000 Contributors
Minified
Minified + Gzipped
Latest Version
0.9.1
Package Id
@fluentui-react-native/merge-props@0.9.1
Unpacked Size
66.20 kB
Size
12.74 kB
File Count
51
NPM Version
10.8.2
Node Version
18.20.5
Publised On
29 Jan 2025
Cumulative downloads
Total Downloads
Last day
284%
553
Compared to previous day
Last week
-59.6%
1,214
Compared to previous week
Last month
-3.8%
8,745
Compared to previous month
Last year
76.4%
75,891
Compared to previous year
Utilities for merging styles and props (which contain styles)
The mergeProps
routine handles merging props together. Generally this is a standard per property merge identical to the behavior of Object.assign
with the following two exceptions:
props.style
will be merged using mergeStyle
above, including caching the resolved stylesprops.className
will be joined together using spaces as a delimiter.Styles are defined using the standard react-native pattern and will be merged in a way that maintains object identity where possible.
This is a copy of the StyleProp definition from react-native
. This is copied primarily in the case where it is used in web code where adding a dependency on the react-native
package itself is not desireable.
The StyleProp pattern itself is allows a style to be provided as a style or a recursive array of styles. So the following pattern is allowed:
1props = { 2 style: [{ ...style1 }, [{ ...style2 }, { ...style3 }, [{ ...style4 }]], { ...style5 }], 3};
In this model merging styles can be effectively deferred by the following:
1const styleToMerge = { ...values }; 2props.style = [props.style, styleToMerge];
This routine merges one or more react-native styles together. The inputs are styles in the StyleProp
format referenced above. The various input styles will be flattened and merged together to produce a single non-flattened output style.
1function mergeStyles<T>(...styles: StyleProp<T>[]): T;
This routine has a built-in caching layer that will attempt to ensure that object identity remains consistent. This means that style A + style B, where the references to A and B are the same, will always produce object C, where the reference will also be the same.
No vulnerabilities found.
Reason
30 commit(s) and 3 issue activity found in the last 90 days -- score normalized to 10
Reason
license file detected
Details
Reason
no dangerous workflow patterns detected
Reason
security policy file detected
Details
Reason
SAST tool is run on all commits
Details
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
1 existing vulnerabilities detected
Details
Reason
Found 18/22 approved changesets -- score normalized to 8
Reason
binaries present in source code
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
project is not fuzzed
Details
Score
Last Scanned on 2025-01-27
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More