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.4.2 to 1.5.0

dist/typed-number.class.d.ts

2

dist/prototypes/number.prototype.d.ts

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

export declare namespace NumberPrototype { }
export declare const NumberPrototype: {};
//# sourceMappingURL=number.prototype.d.ts.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.NumberPrototype = void 0;
exports.NumberPrototype = {};
//# sourceMappingURL=number.prototype.js.map
import { toPrimitive } from './interfaces/to-primitive.interface';
import { StringPrototype } from './prototypes';
import { TypedArray } from './typed-array.class';
import { TypedNumber } from './typed-number.class';
export declare class TypedString<T extends string | number | boolean> implements toPrimitive<`${T}`> {

@@ -11,9 +12,6 @@ private readonly data;

* @param limit A value used to limit the number of elements returned in the array.
*
* @todo support `TypedString` type as Splitter
* @todo support `TypedNumber` type as Limit
*/
split<Splitter extends string = '', Limit extends number = 0>(splitter?: Splitter | TypedString<Splitter>, limit?: Limit): TypedArray<ReturnType<typeof StringPrototype.split<`${T}`, Splitter, Limit>>>;
split<Splitter extends string = '', Limit extends number = 0>(splitter?: Splitter | TypedString<Splitter>, limit?: Limit | TypedNumber<Limit>): TypedArray<ReturnType<typeof StringPrototype.split<`${T}`, Splitter, Limit>>>;
toPrimitive(): `${T}`;
}
//# sourceMappingURL=typed-string.class.d.ts.map

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

const typed_array_class_1 = require("./typed-array.class");
const typed_number_class_1 = require("./typed-number.class");
class TypedString {

@@ -14,9 +15,7 @@ constructor(data = '') {

* @param limit A value used to limit the number of elements returned in the array.
*
* @todo support `TypedString` type as Splitter
* @todo support `TypedNumber` type as Limit
*/
split(splitter = new TypedString(), limit = 0) {
const container = typeof splitter === 'string' ? splitter : splitter.toPrimitive();
const initialValue = this.data.split(container, limit);
split(splitter = new TypedString(), limit = new typed_number_class_1.TypedNumber()) {
const primitiveContainer = typeof splitter === 'string' ? splitter : splitter.toPrimitive();
const primitiveLimit = typeof limit === 'number' ? limit : limit.toPrimitive();
const initialValue = this.data.split(primitiveContainer, primitiveLimit);
return new typed_array_class_1.TypedArray(initialValue);

@@ -23,0 +22,0 @@ }

{
"name": "@kakasoo/proto-typescript",
"version": "1.4.2",
"version": "1.5.0",
"publishConfig": {

@@ -18,3 +18,7 @@ "access": "public"

},
"keywords": [],
"keywords": [
"type-safe",
"prototype",
"utility-types"
],
"author": "",

@@ -21,0 +25,0 @@ "license": "ISC",

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