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

@cloudflare/util-formatters

Package Overview
Dependencies
Maintainers
21
Versions
57
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cloudflare/util-formatters - npm Package Compare versions

Comparing version 2.6.15 to 2.7.0

11

CHANGELOG.md

@@ -6,2 +6,13 @@ # Change Log

# [2.7.0](http://stash.cfops.it:7999/fe/stratus/compare/@cloudflare/util-formatters@2.6.15...@cloudflare/util-formatters@2.7.0) (2021-11-29)
### Features
* **stratus:** EW-5929 Integrate percentage view for chart legend ([7fecfd9](http://stash.cfops.it:7999/fe/stratus/commits/7fecfd9))
## [2.6.15](http://stash.cfops.it:7999/fe/stratus/compare/@cloudflare/util-formatters@2.6.14...@cloudflare/util-formatters@2.6.15) (2021-11-23)

@@ -8,0 +19,0 @@

1

dist/formatters.d.ts

@@ -70,1 +70,2 @@ import { SupportedLocales } from '@cloudflare/intl-core';

export declare const capitalizeStr: (str: string) => string | undefined;
export declare const formatPercentage: (value: number, total: number) => string;

3

es/formatters.js

@@ -166,2 +166,3 @@ import { format as d3Format } from 'd3-format';

};
export const capitalizeStr = str => str && str.charAt(0).toUpperCase() + str.slice(1);
export const capitalizeStr = str => str && str.charAt(0).toUpperCase() + str.slice(1);
export const formatPercentage = (value, total) => `${Math.round(value * 100 / total * 100) / 100}%`;

@@ -6,3 +6,3 @@ "use strict";

});
exports.capitalizeStr = exports.formatNumberForAnalytics = exports.formatBits = exports.formatBytes = exports.formatCurrency = exports.formatNumber = exports.localizeNumberWithPrecision = exports.formatDate = exports.DateFormatters = void 0;
exports.formatPercentage = exports.capitalizeStr = exports.formatNumberForAnalytics = exports.formatBits = exports.formatBytes = exports.formatCurrency = exports.formatNumber = exports.localizeNumberWithPrecision = exports.formatDate = exports.DateFormatters = void 0;

@@ -225,2 +225,8 @@ var _d3Format = require("d3-format");

exports.capitalizeStr = capitalizeStr;
exports.capitalizeStr = capitalizeStr;
var formatPercentage = function formatPercentage(value, total) {
return "".concat(Math.round(value * 100 / total * 100) / 100, "%");
};
exports.formatPercentage = formatPercentage;
{
"name": "@cloudflare/util-formatters",
"description": "",
"version": "2.6.15",
"version": "2.7.0",
"types": "./dist/index.d.ts",

@@ -24,3 +24,3 @@ "main": "lib/index.js",

},
"gitHead": "33e724b3b47f1a0afbbf27e0e868959b34e04945"
"gitHead": "46e16cc7018fe9cf0cde631e409f4d06b4441af7"
}
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