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.9.1 to 0.9.2

4

dist/main/async-optlazy.js

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

function toPromise(optLazy) {
return (0, tslib_1.__awaiter)(this, void 0, void 0, function () {
return (0, tslib_1.__generator)(this, function (_a) {
return tslib_1.__awaiter(this, void 0, void 0, function () {
return tslib_1.__generator(this, function (_a) {
if (optLazy instanceof Function)

@@ -42,0 +42,0 @@ return [2 /*return*/, optLazy()];

@@ -26,5 +26,5 @@ "use strict";

var _this = this;
return create(function () { return (0, tslib_1.__awaiter)(_this, void 0, void 0, function () {
return create(function () { return tslib_1.__awaiter(_this, void 0, void 0, function () {
var _a;
return (0, tslib_1.__generator)(this, function (_b) {
return tslib_1.__generator(this, function (_b) {
switch (_b.label) {

@@ -40,5 +40,5 @@ case 0:

});
}); }, function (state, elem, index, halt) { return (0, tslib_1.__awaiter)(_this, void 0, void 0, function () {
}); }, function (state, elem, index, halt) { return tslib_1.__awaiter(_this, void 0, void 0, function () {
var _a;
return (0, tslib_1.__generator)(this, function (_b) {
return tslib_1.__generator(this, function (_b) {
switch (_b.label) {

@@ -59,3 +59,3 @@ case 0:

var _this = this;
return create(this.init, function (state, elem, index, halt) { return (0, tslib_1.__awaiter)(_this, void 0, void 0, function () { var _a, _b; return (0, tslib_1.__generator)(this, function (_c) {
return create(this.init, function (state, elem, index, halt) { return tslib_1.__awaiter(_this, void 0, void 0, function () { var _a, _b; return tslib_1.__generator(this, function (_c) {
switch (_c.label) {

@@ -72,5 +72,5 @@ case 0:

var _this = this;
return create(function () { return (0, tslib_1.__awaiter)(_this, void 0, void 0, function () {
return create(function () { return tslib_1.__awaiter(_this, void 0, void 0, function () {
var _a;
return (0, tslib_1.__generator)(this, function (_b) {
return tslib_1.__generator(this, function (_b) {
switch (_b.label) {

@@ -86,5 +86,5 @@ case 0:

});
}); }, function (state, elem, index, halt) { return (0, tslib_1.__awaiter)(_this, void 0, void 0, function () {
}); }, function (state, elem, index, halt) { return tslib_1.__awaiter(_this, void 0, void 0, function () {
var nextElem, _a;
return (0, tslib_1.__generator)(this, function (_b) {
return tslib_1.__generator(this, function (_b) {
switch (_b.label) {

@@ -107,3 +107,3 @@ case 0: return [4 /*yield*/, collectFun(elem, index, internal_1.CollectFun.Skip, halt)];

var _this = this;
return create(this.init, this.next, function (state) { return (0, tslib_1.__awaiter)(_this, void 0, void 0, function () { var _a; return (0, tslib_1.__generator)(this, function (_b) {
return create(this.init, this.next, function (state) { return tslib_1.__awaiter(_this, void 0, void 0, function () { var _a; return tslib_1.__generator(this, function (_b) {
switch (_b.label) {

@@ -110,0 +110,0 @@ case 0:

@@ -133,3 +133,3 @@ "use strict";

return _stringComp;
var collator = Intl.Collator.apply(Intl, (0, tslib_1.__spreadArray)([], (0, tslib_1.__read)(args), false));
var collator = Intl.Collator.apply(Intl, tslib_1.__spreadArray([], tslib_1.__read(args), false));
return {

@@ -136,0 +136,0 @@ isComparable: function (obj) {

@@ -285,3 +285,3 @@ "use strict";

return _defaultStringCollatorEq;
var collator = Intl.Collator.apply(Intl, (0, tslib_1.__spreadArray)([], (0, tslib_1.__read)(args), false));
var collator = Intl.Collator.apply(Intl, tslib_1.__spreadArray([], tslib_1.__read(args), false));
return function (v1, v2) { return collator.compare(v1, v2) === 0; };

@@ -288,0 +288,0 @@ }

@@ -38,3 +38,3 @@ "use strict";

var ForcedError = /** @class */ (function (_super) {
(0, tslib_1.__extends)(ForcedError, _super);
tslib_1.__extends(ForcedError, _super);
function ForcedError() {

@@ -41,0 +41,0 @@ return _super !== null && _super.apply(this, arguments) || this;

@@ -18,3 +18,3 @@ "use strict";

if (Array.isArray(range.start)) {
var _b = (0, tslib_1.__read)(range.start, 2), start_1 = _b[0], includeStart = _b[1];
var _b = tslib_1.__read(range.start, 2), start_1 = _b[0], includeStart = _b[1];
if (includeStart)

@@ -21,0 +21,0 @@ return [start_1, start_1 + range.amount - 1];

@@ -9,3 +9,3 @@ "use strict";

var tslib_1 = require("tslib");
(0, tslib_1.__exportStar)(require("./internal"), exports);
tslib_1.__exportStar(require("./internal"), exports);
//# sourceMappingURL=index.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
(0, tslib_1.__exportStar)(require("./collect"), exports);
(0, tslib_1.__exportStar)(require("./comp"), exports);
(0, tslib_1.__exportStar)(require("./eq"), exports);
(0, tslib_1.__exportStar)(require("./err"), exports);
(0, tslib_1.__exportStar)(require("./index-range"), exports);
(0, tslib_1.__exportStar)(require("./optlazy"), exports);
(0, tslib_1.__exportStar)(require("./range"), exports);
(0, tslib_1.__exportStar)(require("./reducer"), exports);
(0, tslib_1.__exportStar)(require("./traverse-state"), exports);
(0, tslib_1.__exportStar)(require("./types"), exports);
(0, tslib_1.__exportStar)(require("./update"), exports);
(0, tslib_1.__exportStar)(require("./async-optlazy"), exports);
(0, tslib_1.__exportStar)(require("./async-reducer"), exports);
tslib_1.__exportStar(require("./collect"), exports);
tslib_1.__exportStar(require("./comp"), exports);
tslib_1.__exportStar(require("./eq"), exports);
tslib_1.__exportStar(require("./err"), exports);
tslib_1.__exportStar(require("./index-range"), exports);
tslib_1.__exportStar(require("./optlazy"), exports);
tslib_1.__exportStar(require("./range"), exports);
tslib_1.__exportStar(require("./reducer"), exports);
tslib_1.__exportStar(require("./traverse-state"), exports);
tslib_1.__exportStar(require("./types"), exports);
tslib_1.__exportStar(require("./update"), exports);
tslib_1.__exportStar(require("./async-optlazy"), exports);
tslib_1.__exportStar(require("./async-reducer"), exports);
//# sourceMappingURL=internal.js.map
{
"name": "@rimbu/common",
"version": "0.9.1",
"version": "0.9.2",
"description": "Common types and objects used in many other Rimbu packages",

@@ -64,5 +64,5 @@ "keywords": [

"dependencies": {
"tslib": "^2.3.1"
"tslib": "^2.4.0"
},
"gitHead": "f44e1b43f07ac973555270806bbdde5f06400941"
"gitHead": "33dd7ca935f19f513586834a2ce1b1f886352ae7"
}

@@ -27,3 +27,3 @@ <p align="center">

For complete documentation please visit the _[Rimbu Docs](https://rimbu.org)_.
For complete documentation please visit the _[Rimbu Docs](https://rimbu.org)_, or directly see the _[Rimbu Common API Docs](https://rimbu.org/api/rimbu/common)_.

@@ -48,26 +48,37 @@ Or [Try Out Rimbu](https://codesandbox.io/s/github/vitoke/rimbu-sandbox/tree/main?previewwindow=console&view=split&editorsize=65&moduleview=1&module=/src/index.ts) in CodeSandBox.

Create a file called `rimbu.ts` and add the following:
For Deno, the following approach is recommended:
> ```ts
> export * from 'https://deno.land/x/rimbu/common/mod.ts';
> ```
In the root folder of your project, create or edit a file called `import_map.json` with the following contents (where you should replace `x.y.z` with the desired version of Rimbu):
Or using a pinned version (`x.y.z`):
```json
{
"imports": {
"@rimbu/": "https://deno.land/x/rimbu@x.y.z/"
}
}
```
> ```ts
> export * from 'https://deno.land/x/rimbu/common@x.y.z/mod.ts';
> ```
**Note: The trailing slashes are important!**
Then import what you need from `rimbu.ts`:
In this way you can use relative imports from Rimbu in your code, like so:
```ts
import { Eq } from './rimbu.ts';
import { List } from '@rimbu/core/mod.ts';
import { HashMap } from '@rimbu/hashed/mod.ts';
```
Because Rimbu uses complex types, it's recommended to use the `--no-check` flag (your editor should already have checked your code) and to specify a `tsconfig.json` file with the settings described below.
Note that for sub-packages, due to conversion limitations it is needed to import the `index.ts` instead of `mod.ts`, like so:
Running your script then becomes:
```ts
import { HashMap } from '@rimbu/hashed/map/index.ts';
```
> `deno run --no-check --config tsconfig.json <your-script>.ts`
To run your script (let's assume the entry point is in `src/main.ts`):
`deno run --import-map import_map.json src/main.ts`
Because Rimbu uses advanced types, this may slow down the type checking part when running your code. If you're able to rely on your code editor to provide type errors, you can skip the Deno type check using the `--no-check` flag:
`deno run --import-map import_map.json --no-check src/main.ts`
## Usage

@@ -92,3 +103,3 @@

<img src = "https://contrib.rocks/image?repo=vitoke/iternal"/>
<img src = "https://contrib.rocks/image?repo=rimbu-org/rimbu"/>

@@ -95,0 +106,0 @@ Made with [contributors-img](https://contrib.rocks).

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

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