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

@peersyst/react-utils

Package Overview
Dependencies
Maintainers
1
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@peersyst/react-utils - npm Package Compare versions

Comparing version 1.2.0 to 1.2.1

5

./@types/minDigits.d.ts

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

export default function (n: number | string, d: number): string;
export interface MinDigitsOptions {
fill?: "left" | "right";
}
export default function (n: number | string, d: number, { fill }?: MinDigitsOptions): string;
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
export default function (n, d) {
var _ref = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},
_ref$fill = _ref.fill,
fill = _ref$fill === void 0 ? "left" : _ref$fill;
var num = n.toString();
return _toConsumableArray(Array(d - num.length)).reduce(function () {
var dif = d - num.length;
var zeros = dif > 0 ? _toConsumableArray(Array(dif)).reduce(function () {
var prev = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
return prev + "0";
}, "") + num;
}, "") : "";
return (fill === "left" ? zeros : "") + num + (fill === "right" ? zeros : "");
}
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
export default function (n, d) {
var _ref = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},
_ref$fill = _ref.fill,
fill = _ref$fill === void 0 ? "left" : _ref$fill;
var num = n.toString();
return _toConsumableArray(Array(d - num.length)).reduce(function () {
var dif = d - num.length;
var zeros = dif > 0 ? _toConsumableArray(Array(dif)).reduce(function () {
var prev = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
return prev + "0";
}, "") + num;
}, "") : "";
return (fill === "left" ? zeros : "") + num + (fill === "right" ? zeros : "");
}
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
export default function (n, d) {
var _ref = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},
_ref$fill = _ref.fill,
fill = _ref$fill === void 0 ? "left" : _ref$fill;
var num = n.toString();
return _toConsumableArray(Array(d - num.length)).reduce(function () {
var dif = d - num.length;
var zeros = dif > 0 ? _toConsumableArray(Array(dif)).reduce(function () {
var prev = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
return prev + "0";
}, "") + num;
}, "") : "";
return (fill === "left" ? zeros : "") + num + (fill === "right" ? zeros : "");
}

@@ -13,7 +13,13 @@ "use strict";

function _default(n, d) {
var _ref = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},
_ref$fill = _ref.fill,
fill = _ref$fill === void 0 ? "left" : _ref$fill;
var num = n.toString();
return (0, _toConsumableArray2["default"])(Array(d - num.length)).reduce(function () {
var dif = d - num.length;
var zeros = dif > 0 ? (0, _toConsumableArray2["default"])(Array(dif)).reduce(function () {
var prev = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
return prev + "0";
}, "") + num;
}, "") : "";
return (fill === "left" ? zeros : "") + num + (fill === "right" ? zeros : "");
}

2

package.json
{
"name": "@peersyst/react-utils",
"author": "Peersyst",
"version": "1.2.0",
"version": "1.2.1",
"license": "MIT",

@@ -6,0 +6,0 @@ "main": "./node/index.js",

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