New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@a-type/utils

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@a-type/utils - npm Package Compare versions

Comparing version 1.0.7 to 1.0.8

1

dist/cjs/strings.d.ts
export declare function capitalize(str: string): string;
export declare function shortenTimeUnits(time: string): string;
export declare function formatMinutes(minutes: number): string;
export declare function fractionToText(decimal: number): string;
export declare function isUrl(str: string): boolean;
export declare function urlify(str: string): string;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.urlify = exports.isUrl = exports.fractionToText = exports.shortenTimeUnits = exports.capitalize = void 0;
exports.urlify = exports.isUrl = exports.fractionToText = exports.formatMinutes = exports.shortenTimeUnits = exports.capitalize = void 0;
function capitalize(str) {

@@ -17,2 +17,8 @@ return str.charAt(0).toUpperCase() + str.slice(1);

exports.shortenTimeUnits = shortenTimeUnits;
function formatMinutes(minutes) {
const hours = Math.floor(minutes / 60);
const min = minutes % 60;
return `${hours ? `${hours} hr` : ''}${min ? ` ${min} min` : ''}`;
}
exports.formatMinutes = formatMinutes;
function fractionToText(decimal) {

@@ -19,0 +25,0 @@ let maxDenominator = 10;

export declare function capitalize(str: string): string;
export declare function shortenTimeUnits(time: string): string;
export declare function formatMinutes(minutes: number): string;
export declare function fractionToText(decimal: number): string;
export declare function isUrl(str: string): boolean;
export declare function urlify(str: string): string;

@@ -12,2 +12,7 @@ export function capitalize(str) {

}
export function formatMinutes(minutes) {
const hours = Math.floor(minutes / 60);
const min = minutes % 60;
return `${hours ? `${hours} hr` : ''}${min ? ` ${min} min` : ''}`;
}
export function fractionToText(decimal) {

@@ -14,0 +19,0 @@ let maxDenominator = 10;

2

package.json
{
"name": "@a-type/utils",
"version": "1.0.7",
"version": "1.0.8",
"description": "",

@@ -5,0 +5,0 @@ "access": "public",

@@ -14,2 +14,8 @@ export function capitalize(str: string) {

export function formatMinutes(minutes: number) {
const hours = Math.floor(minutes / 60);
const min = minutes % 60;
return `${hours ? `${hours} hr` : ''}${min ? ` ${min} min` : ''}`;
}
export function fractionToText(decimal: number) {

@@ -16,0 +22,0 @@ let maxDenominator = 10;

Sorry, the diff of this file is not supported yet

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