Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@react-pdf/fns

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

@react-pdf/fns - npm Package Compare versions

Comparing version 2.1.0 to 2.2.0

59

lib/index.js

@@ -25,5 +25,13 @@ import _regeneratorRuntime from '@babel/runtime/helpers/regeneratorRuntime';

/**
* @typedef {Function} AsyncCompose
* @param {any} value
* @param {...any} args
* @returns {any} result
*/
/**
* Performs right-to-left function composition with async functions support
*
* @param {...any} functions
* @param {...Function} fns functions
* @returns {AsyncCompose} composed function
*/

@@ -84,4 +92,4 @@ var asyncCompose = function asyncCompose() {

*
* @param {String} string
* @returns {String} capitalized string
* @param {string} value string
* @returns {string} capitalized string
*/

@@ -98,4 +106,5 @@ var capitalize = function capitalize(value) {

*
* @param {any} value
* @returns {Array} casted value
* @template T
* @param {T|T[]} value value
* @returns {T[]} array
*/

@@ -108,6 +117,15 @@ var castArray = function castArray(value) {

/**
* @typedef {Function} Compose
* @param {any} value
* @param {...any} args
* @returns {any} result
*/
/**
* Performs right-to-left function composition
*
* @param {...any} functions
* @param {...Function} fns functions
* @returns {Compose} composed function
*/

@@ -181,4 +199,8 @@ var compose = function compose() {

/**
* @param {string | number} value
* @returns {RegExpExecArray | null} match
*/
var isPercent = function isPercent(value) {
return /((-)?\d+\.?\d*)%/g.exec(value);
return /((-)?\d+\.?\d*)%/g.exec("" + value);
};

@@ -189,4 +211,4 @@

*
* @param {String} value
* @returns {Object} percent value (if matches)
* @param {string | number} value
* @returns {{ percent: number, value: number } | null} percent value (if matches)
*/

@@ -196,3 +218,3 @@ var matchPercent = function matchPercent(value) {

if (match) {
var f = parseFloat(match[1], 10);
var f = parseFloat(match[1]);
var percent = f / 100;

@@ -225,7 +247,18 @@ return {

var repeat = function repeat(list, length) {
if (length === void 0) {
length = 0;
}
var result = new Array(length);
for (var i = 0; i < length; i += 1) {
result[i] = list;
}
return result;
};
/**
* Capitalize first letter of string
*
* @param {String} string
* @returns {String} capitalized string
* @param {string} value string
* @returns {string} capitalized string
*/

@@ -237,2 +270,2 @@ var upperFirst = function upperFirst(value) {

export { adjust, asyncCompose, capitalize, castArray, compose, dropLast, evolve, get, isNil, last, mapValues, matchPercent, omit, pick, reverse, upperFirst };
export { adjust, asyncCompose, capitalize, castArray, compose, dropLast, evolve, get, isNil, last, mapValues, matchPercent, omit, pick, repeat, reverse, upperFirst };
{
"name": "@react-pdf/fns",
"version": "2.1.0",
"version": "2.2.0",
"license": "MIT",

@@ -24,3 +24,3 @@ "description": "React-pdf helper functions",

"scripts": {
"test": "NODE_OPTIONS=\"--experimental-vm-modules\" jest",
"test": "vitest",
"build": "rimraf ./lib && rollup -c",

@@ -27,0 +27,0 @@ "watch": "rimraf ./lib && rollup -c -w"

@@ -10,4 +10,5 @@ <p align="center">

## How to install
```sh
yarn add @react-pdf/fns
```

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