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

@opencreek/ext

Package Overview
Dependencies
Maintainers
3
Versions
93
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@opencreek/ext - npm Package Compare versions

Comparing version 1.7.0--canary.12.1829834790.0 to 1.7.0--canary.12.1829881820.0

6

build/range.d.ts

@@ -0,2 +1,8 @@

/**
* range will make an array from start to end (exclusive), with the given step
* @param start first value in the array
* @param end last value + step of the array
* @param step step between entries
*/
export declare function range(start: number, end: number, step?: number): Array<number>;
//# sourceMappingURL=range.d.ts.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.range = void 0;
/**
* range will make an array from start to end (exclusive), with the given step
* @param start first value in the array
* @param end last value + step of the array
* @param step step between entries
*/
function range(start, end, step = 1) {

@@ -5,0 +11,0 @@ const length = (end - start) / step + 1;

4

build/sleep.d.ts

@@ -0,2 +1,6 @@

/**
* sleep will sleep for the given milliseconds and then resolve the Promise
* @param ms number of milliseconds to sleep
*/
export declare function sleep(ms: number): Promise<void>;
//# sourceMappingURL=sleep.d.ts.map

@@ -13,2 +13,6 @@ "use strict";

exports.sleep = void 0;
/**
* sleep will sleep for the given milliseconds and then resolve the Promise
* @param ms number of milliseconds to sleep
*/
function sleep(ms) {

@@ -15,0 +19,0 @@ return __awaiter(this, void 0, void 0, function* () {

import "./collections";
/**
* tableToString will convert an array of records into a nicely formatted tableRow
*
* Example:
*
* Input: [ { key: "value", foo: "bar" }, { key: "other value", foo: "other bar" } ]
*
* -------------------------
* | key | foo |
* -------------------------
* | value | bar |
* | other value | other bar |
* -------------------------
*
* @param table the table as an array of records
* @param columns keys of the record that will be included in the table
*/
export declare function tableToString<T extends Record<string | number | symbol, unknown>>(table: Array<T>, columns: Array<keyof T>): string;
//# sourceMappingURL=table.d.ts.map

@@ -14,2 +14,19 @@ "use strict";

}
/**
* tableToString will convert an array of records into a nicely formatted tableRow
*
* Example:
*
* Input: [ { key: "value", foo: "bar" }, { key: "other value", foo: "other bar" } ]
*
* -------------------------
* | key | foo |
* -------------------------
* | value | bar |
* | other value | other bar |
* -------------------------
*
* @param table the table as an array of records
* @param columns keys of the record that will be included in the table
*/
function tableToString(table, columns) {

@@ -16,0 +33,0 @@ const columnLengths = columns.map((key) => {

2

package.json
{
"name": "@opencreek/ext",
"version": "1.7.0--canary.12.1829834790.0",
"version": "1.7.0--canary.12.1829881820.0",
"description": "",

@@ -5,0 +5,0 @@ "main": "build/index.js",

@@ -0,1 +1,7 @@

/**
* range will make an array from start to end (exclusive), with the given step
* @param start first value in the array
* @param end last value + step of the array
* @param step step between entries
*/
export function range(start: number, end: number, step = 1): Array<number> {

@@ -2,0 +8,0 @@ const length = (end - start) / step + 1

@@ -0,1 +1,5 @@

/**
* sleep will sleep for the given milliseconds and then resolve the Promise
* @param ms number of milliseconds to sleep
*/
export async function sleep(ms: number): Promise<void> {

@@ -2,0 +6,0 @@ const p = new Promise<void>((resolve) => {

import test from "ava"
import { cwd } from "process"
import { tableToString } from "./table"

@@ -3,0 +4,0 @@

@@ -19,2 +19,19 @@ import { range } from "./range"

/**
* tableToString will convert an array of records into a nicely formatted tableRow
*
* Example:
*
* Input: [ { key: "value", foo: "bar" }, { key: "other value", foo: "other bar" } ]
*
* -------------------------
* | key | foo |
* -------------------------
* | value | bar |
* | other value | other bar |
* -------------------------
*
* @param table the table as an array of records
* @param columns keys of the record that will be included in the table
*/
export function tableToString<

@@ -21,0 +38,0 @@ T extends Record<string | number | symbol, unknown>

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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