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

@kakasoo/proto-typescript

Package Overview
Dependencies
Maintainers
1
Versions
60
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@kakasoo/proto-typescript - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

15

dist/array.prototype.d.ts

@@ -1,2 +0,15 @@

export declare namespace ArrayPrototype { }
import { Join } from "./types";
export declare namespace ArrayPrototype {
/**
* type-safe join.
*
* @example ArrayPrototype.join(["a", "b"]);
* @example ArrayPrototype.join(["a", "b"] as const);
* @param arr
* @param separator
* @returns
*/
function join<Container extends readonly (string | number)[] | (string | number)[], Separator extends string = ",">(arr: Container, separator?: Separator): Join<Container, Separator>;
}
//# sourceMappingURL=array.prototype.d.ts.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ArrayPrototype = void 0;
var ArrayPrototype;
(function (ArrayPrototype) {
/**
* type-safe join.
*
* @example ArrayPrototype.join(["a", "b"]);
* @example ArrayPrototype.join(["a", "b"] as const);
* @param arr
* @param separator
* @returns
*/
function join(arr, separator = ",") {
return arr.join(separator);
}
ArrayPrototype.join = join;
})(ArrayPrototype || (exports.ArrayPrototype = ArrayPrototype = {}));
//# sourceMappingURL=array.prototype.js.map

10

dist/types/array.type.d.ts
import { Add, Divide, Multiply, NToNumber, Remainder, Sub } from "./number.type";
import { Equal, Merge } from "./object.type";
import { ToString, ToStringTuple } from "./string.type";
export type Length<T extends any[]> = T["length"];

@@ -45,7 +44,8 @@ /**

* Join<['a', 'b', 'c'], '-'> // 'a-b-c'
* Join<string[], "-">; // string
*/
export type Join<T extends string[], U extends string | number> = T extends [
infer F,
...infer Rest
] ? Rest extends [] ? `${ToString<F>}` : `${ToString<F>}${U}${Join<ToStringTuple<Rest>, U>}` : "";
export type Join<T extends readonly (string | number)[] | (string | number)[], U extends string = ","> = T extends readonly [
infer F extends string | number,
...infer Rest extends (string | number)[]
] ? Rest extends [] ? `${F}` : `${F}${U}${Join<Rest, U>}` : string;
export type IsTuple<T extends readonly any[] | {

@@ -52,0 +52,0 @@ length: number;

@@ -0,3 +1,8 @@

export * from "./arithmetic.type";
export * from "./array.type";
export * from "./function.type";
export * from "./never.type";
export * from "./object.type";
export * from "./string.type";
export * from "./union.type";
//# sourceMappingURL=index.d.ts.map

@@ -17,4 +17,9 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
__exportStar(require("./arithmetic.type"), exports);
__exportStar(require("./array.type"), exports);
__exportStar(require("./function.type"), exports);
__exportStar(require("./never.type"), exports);
__exportStar(require("./object.type"), exports);
__exportStar(require("./string.type"), exports);
__exportStar(require("./union.type"), exports);
//# sourceMappingURL=index.js.map
import { Sub } from "./number.type";
export type ToStringTuple<T> = T extends string[] ? T : never;
export type ToString<T> = T extends string ? T : T extends number ? `${T}` : never;
export type Join<T extends string[], U extends string | number> = T extends [
infer F,
...infer Rest
] ? Rest extends [] ? F : `${ToString<F>}${U}${Join<ToStringTuple<Rest>, U>}` : "";
export type IsAlphabet<T extends string> = Uppercase<T> extends Lowercase<T> ? Lowercase<T> extends Uppercase<T> ? true : false : false;

@@ -9,0 +5,0 @@ export type IsUpperCase<T extends string> = Uppercase<T> extends T ? true : false;

{
"name": "@kakasoo/proto-typescript",
"version": "1.0.2",
"version": "1.0.3",
"publishConfig": {

@@ -14,3 +14,5 @@ "access": "public"

"scripts": {
"build": "tsc"
"build": "tsc",
"prepublish": "tsc",
"publish": "npm publish"
},

@@ -17,0 +19,0 @@ "keywords": [],

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