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

@rimbu/common

Package Overview
Dependencies
Maintainers
1
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rimbu/common - npm Package Compare versions

Comparing version 0.5.9 to 0.6.0

19

dist/main/err.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Err = void 0;
exports.ErrBase = exports.Err = void 0;
var tslib_1 = require("tslib");

@@ -13,6 +13,7 @@ /**

function Err() {
return Err.msg('Err: Forced to throw error')();
return ErrBase.msg('Err: Forced to throw error')();
}
exports.Err = Err;
(function (Err) {
var ErrBase;
(function (ErrBase) {
/**

@@ -34,3 +35,3 @@ * A custom error instance.

}());
Err.CustomError = CustomError;
ErrBase.CustomError = CustomError;
var ForcedError = /** @class */ (function (_super) {

@@ -43,3 +44,3 @@ tslib_1.__extends(ForcedError, _super);

}(CustomError));
Err.ForcedError = ForcedError;
ErrBase.ForcedError = ForcedError;
/**

@@ -51,3 +52,3 @@ * Returns a function that, when called, throws an `Err.ForcedError` with the given `message` string.

* const emptyMap = HashMap.empty<number, string>()
* emptyMap.get(5, Err.msg('not found'));
* emptyMap.get(5, ErrBase.msg('not found'));
* // throws: Err.CustomError(message: 'not found')

@@ -58,7 +59,7 @@ * ```

return function () {
throw new Err.ForcedError(message);
throw new ErrBase.ForcedError(message);
};
}
Err.msg = msg;
})(Err = exports.Err || (exports.Err = {}));
ErrBase.msg = msg;
})(ErrBase = exports.ErrBase || (exports.ErrBase = {}));
//# sourceMappingURL=err.js.map

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

this.startIndex = startIndex;
this.currentIndex = this.startIndex;
this.halted = false;

@@ -14,2 +13,3 @@ this.halt = function () {

};
this.currentIndex = startIndex;
}

@@ -16,0 +16,0 @@ TraverseStateImpl.prototype.nextIndex = function () {

@@ -9,5 +9,6 @@ /**

export function Err() {
return Err.msg('Err: Forced to throw error')();
return ErrBase.msg('Err: Forced to throw error')();
}
(function (Err) {
export var ErrBase;
(function (ErrBase) {
/**

@@ -24,6 +25,6 @@ * A custom error instance.

}
Err.CustomError = CustomError;
ErrBase.CustomError = CustomError;
class ForcedError extends CustomError {
}
Err.ForcedError = ForcedError;
ErrBase.ForcedError = ForcedError;
/**

@@ -35,3 +36,3 @@ * Returns a function that, when called, throws an `Err.ForcedError` with the given `message` string.

* const emptyMap = HashMap.empty<number, string>()
* emptyMap.get(5, Err.msg('not found'));
* emptyMap.get(5, ErrBase.msg('not found'));
* // throws: Err.CustomError(message: 'not found')

@@ -42,7 +43,7 @@ * ```

return function () {
throw new Err.ForcedError(message);
throw new ErrBase.ForcedError(message);
};
}
Err.msg = msg;
})(Err || (Err = {}));
ErrBase.msg = msg;
})(ErrBase || (ErrBase = {}));
//# sourceMappingURL=err.js.map
class TraverseStateImpl {
constructor(startIndex) {
this.startIndex = startIndex;
this.currentIndex = this.startIndex;
this.halted = false;

@@ -9,2 +8,3 @@ this.halt = () => {

};
this.currentIndex = startIndex;
}

@@ -11,0 +11,0 @@ nextIndex() {

@@ -9,3 +9,3 @@ /**

export declare function Err(): never;
export declare namespace Err {
export declare namespace ErrBase {
/**

@@ -27,3 +27,3 @@ * A custom error instance.

* const emptyMap = HashMap.empty<number, string>()
* emptyMap.get(5, Err.msg('not found'));
* emptyMap.get(5, ErrBase.msg('not found'));
* // throws: Err.CustomError(message: 'not found')

@@ -30,0 +30,0 @@ * ```

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

import { Range } from './internal';
import type { Range } from './internal';
/**

@@ -3,0 +3,0 @@ * A flexible range specification for numeric indices.

{
"name": "@rimbu/common",
"version": "0.5.9",
"version": "0.6.0",
"description": "Common types and objects used in many other Rimbu packages",

@@ -41,2 +41,3 @@ "keywords": [

"build": "yarn clean && yarn bundle",
"build:deno": "rimraf deno_dist ../../deno_dist/common && denoify && cp ../../config/mod_ts_template deno_dist/mod.ts && mv deno_dist ../../deno_dist/common",
"bundle": "yarn bundle:main && yarn bundle:module && yarn bundle:types",

@@ -58,3 +59,6 @@ "bundle:main": "tsc --p tsconfig.main.json",

},
"gitHead": "0158eaad0dec4503e92cb308af952869d68faad5"
"denoify": {
"replacer": "../../config/denoify-rimbu-replacer.js"
},
"gitHead": "dbcaad0cb6b1e31ffa64ca2739b9ddb0fc178ebc"
}
<p align="center">
<img src="../../assets/rimbu_logo.svg" />
<img src="https://github.com/rimbu-org/rimbu/raw/main/assets/rimbu_logo.svg" />
</p>

@@ -29,2 +29,4 @@

Or [Try Me Out](https://codesandbox.io/s/rimbu-sandbox-d4tbk?previewwindow=console&view=split&editorsize=65&moduleview=1&module=/src/index.ts) in CodeSandBox.
## Installation

@@ -31,0 +33,0 @@

@@ -9,6 +9,6 @@ /**

export function Err(): never {
return Err.msg('Err: Forced to throw error')();
return ErrBase.msg('Err: Forced to throw error')();
}
export namespace Err {
export namespace ErrBase {
/**

@@ -33,3 +33,3 @@ * A custom error instance.

* const emptyMap = HashMap.empty<number, string>()
* emptyMap.get(5, Err.msg('not found'));
* emptyMap.get(5, ErrBase.msg('not found'));
* // throws: Err.CustomError(message: 'not found')

@@ -40,5 +40,5 @@ * ```

return function (): never {
throw new Err.ForcedError(message);
throw new ErrBase.ForcedError(message);
};
}
}

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

import { Range } from './internal';
import type { Range } from './internal';

@@ -3,0 +3,0 @@ /**

@@ -31,7 +31,9 @@ /**

class TraverseStateImpl implements TraverseState {
constructor(readonly startIndex: number) {}
currentIndex = this.startIndex;
currentIndex: number;
halted = false;
constructor(readonly startIndex: number) {
this.currentIndex = startIndex;
}
nextIndex(): number {

@@ -38,0 +40,0 @@ return this.currentIndex++;

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