0.9.3 • Published 7 months ago

@types/format-io v0.9.3

Weekly downloads
23
License
MIT
Repository
github
Last release
7 months ago

Installation

npm install --save @types/format-io

Summary

This package contains type definitions for format-io (https://github.com/coderaiser/format-io).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/format-io.

index.d.ts

// Type definitions for format-io 0.9
// Project: https://github.com/coderaiser/format-io
// Definitions by: Amit Beckenstein <https://github.com/amitbeck>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

/**
 * Appends a '/' to the end of the path unless it exists.
 * @param path A path.
 * @returns The path with a '/' appended to it.
 */
export function addSlashToEnd(path: string): string;

/**
 * Returns a short string representing the size of bytes in unit symbols up to petabytes.
 * @param size Size in bytes.
 * @returns A string representing the size in the matching unit symbol.
 */
export function size(size: number): string;

/**
 * Contains functions to format permissions.
 */
export namespace permissions {
    /**
     * Converts Unix-like permissions from numeric to symbolic notation.
     * @param perm A string of Unix-like permission in numeric notation.
     * @returns A representation of the permissions in symbolic notation.
     */
    function symbolic(perm: string): string;

    /**
     * Converts Unix-like permissions from symbolic to numeric notation.
     * @param perm A string of Unix-like permission in symbolic notation.
     * @returns A representation of the permissions in numeric notation.
     */
    function numeric(perm: string): string;
}

Additional Details

  • Last updated: Thu, 16 Dec 2021 22:31:56 GMT
  • Dependencies: none
  • Global values: none

Credits

These definitions were written by Amit Beckenstein.