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.3.0 to 1.4.0

11

dist/prototypes/string.prototype.d.ts
import { Split } from '../types';
export declare const StringPrototype: {
split<Container extends string, Splitter extends string, Limit extends number>(container: Container, splitter: Splitter, limit?: Limit | undefined): Split<Container, Splitter, Limit>;
/**
* type-safe split.
* @example StringPrototype.split('abcde', 'c', 1) // ['ab']
*
* @param container
* @param splitter
* @param limit
* @returns
*/
split<Container extends string, Splitter extends string = "", Limit extends number = 0>(container: Container, splitter: Splitter, limit?: Limit | undefined): Split<Container, Splitter, Limit>;
};
//# sourceMappingURL=string.prototype.d.ts.map

@@ -5,2 +5,11 @@ "use strict";

exports.StringPrototype = {
/**
* type-safe split.
* @example StringPrototype.split('abcde', 'c', 1) // ['ab']
*
* @param container
* @param splitter
* @param limit
* @returns
*/
split(container, splitter, limit) {

@@ -7,0 +16,0 @@ return container.split(splitter, limit);

4

dist/typed-array.class.js

@@ -16,4 +16,4 @@ "use strict";

join(separator = '') {
const initalValue = prototypes_1.ArrayPrototype.join(this.data, separator);
return new typed_string_class_1.TypedString(initalValue);
const initialValue = prototypes_1.ArrayPrototype.join(this.data, separator);
return new typed_string_class_1.TypedString(initialValue);
}

@@ -20,0 +20,0 @@ toPrimitive() {

import { toPrimitive } from './interfaces/to-primitive.interface';
import { StringPrototype } from './prototypes';
import { TypedArray } from './typed-array.class';
export declare class TypedString<T extends string | number | boolean> implements toPrimitive<`${T}`> {
private readonly data;
constructor(data: T);
split<Splitter extends string = '', Limit extends number = 0>(splitter?: Splitter, limit?: Limit): TypedArray<ReturnType<typeof StringPrototype.split<`${T}`, Splitter, Limit>>>;
toPrimitive(): `${T}`;
}
//# sourceMappingURL=typed-string.class.d.ts.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.TypedString = void 0;
const typed_array_class_1 = require("./typed-array.class");
class TypedString {

@@ -8,2 +9,6 @@ constructor(data) {

}
split(splitter = '', limit = 0) {
const initialValue = this.data.split(splitter, limit);
return new typed_array_class_1.TypedArray(initialValue);
}
toPrimitive() {

@@ -10,0 +15,0 @@ return this.data;

{
"name": "@kakasoo/proto-typescript",
"version": "1.3.0",
"version": "1.4.0",
"publishConfig": {

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

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