@rimbu/base
Advanced tools
Comparing version 0.8.1 to 0.8.2
@@ -49,5 +49,5 @@ "use strict"; | ||
else { | ||
var length = array.length; | ||
var length_1 = array.length; | ||
var i = -1; | ||
while (!state.halted && ++i < length) { | ||
while (!state.halted && ++i < length_1) { | ||
f(array[i], state.nextIndex(), halt); | ||
@@ -147,3 +147,3 @@ } | ||
var clone = arr.slice(); | ||
clone.splice.apply(clone, (0, tslib_1.__spreadArray)([start, deleteCount], (0, tslib_1.__read)(items), false)); | ||
clone.splice.apply(clone, tslib_1.__spreadArray([start, deleteCount], tslib_1.__read(items), false)); | ||
return clone; | ||
@@ -150,0 +150,0 @@ } |
@@ -5,9 +5,9 @@ "use strict"; | ||
var tslib_1 = require("tslib"); | ||
var Arr = (0, tslib_1.__importStar)(require("./arr")); | ||
var Arr = tslib_1.__importStar(require("./arr")); | ||
exports.Arr = Arr; | ||
var Entry = (0, tslib_1.__importStar)(require("./entry")); | ||
var Entry = tslib_1.__importStar(require("./entry")); | ||
exports.Entry = Entry; | ||
var RimbuError = (0, tslib_1.__importStar)(require("./rimbu-error")); | ||
var RimbuError = tslib_1.__importStar(require("./rimbu-error")); | ||
exports.RimbuError = RimbuError; | ||
(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("./token"), exports); | ||
tslib_1.__exportStar(require("./token"), exports); | ||
//# sourceMappingURL=internal.js.map |
@@ -7,3 +7,3 @@ "use strict"; | ||
var EmptyCollectionAssumedNonEmptyError = /** @class */ (function (_super) { | ||
(0, tslib_1.__extends)(EmptyCollectionAssumedNonEmptyError, _super); | ||
tslib_1.__extends(EmptyCollectionAssumedNonEmptyError, _super); | ||
function EmptyCollectionAssumedNonEmptyError() { | ||
@@ -16,3 +16,3 @@ return _super.call(this, 'empty collection was assumbed to be non-empty') || this; | ||
var ModifiedBuilderWhileLoopingOverItError = /** @class */ (function (_super) { | ||
(0, tslib_1.__extends)(ModifiedBuilderWhileLoopingOverItError, _super); | ||
tslib_1.__extends(ModifiedBuilderWhileLoopingOverItError, _super); | ||
function ModifiedBuilderWhileLoopingOverItError() { | ||
@@ -25,3 +25,3 @@ return _super.call(this, 'an attempt was made to modify a builder while looping over it') || this; | ||
var InvalidStateError = /** @class */ (function (_super) { | ||
(0, tslib_1.__extends)(InvalidStateError, _super); | ||
tslib_1.__extends(InvalidStateError, _super); | ||
function InvalidStateError() { | ||
@@ -34,3 +34,3 @@ return _super.call(this, "something happend that shouldn't happen, please consider creating an issue") || this; | ||
var InvalidUsageError = /** @class */ (function (_super) { | ||
(0, tslib_1.__extends)(InvalidUsageError, _super); | ||
tslib_1.__extends(InvalidUsageError, _super); | ||
function InvalidUsageError() { | ||
@@ -37,0 +37,0 @@ return _super !== null && _super.apply(this, arguments) || this; |
{ | ||
"name": "@rimbu/base", | ||
"version": "0.8.1", | ||
"version": "0.8.2", | ||
"description": "Utilities to implement Rimbu collections", | ||
@@ -54,4 +54,4 @@ "keywords": [ | ||
"dependencies": { | ||
"@rimbu/common": "^0.9.1", | ||
"tslib": "^2.3.1" | ||
"@rimbu/common": "^0.9.2", | ||
"tslib": "^2.4.0" | ||
}, | ||
@@ -65,3 +65,3 @@ "publishConfig": { | ||
}, | ||
"gitHead": "f44e1b43f07ac973555270806bbdde5f06400941" | ||
"gitHead": "33dd7ca935f19f513586834a2ce1b1f886352ae7" | ||
} |
@@ -11,3 +11,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 the _[Rimbu API Docs](https://rimbu.org/api)_ | ||
@@ -26,26 +26,37 @@ ## Installation | ||
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/base/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/base@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 { Arr } 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 | ||
@@ -74,3 +85,3 @@ | ||
<img src = "https://contrib.rocks/image?repo=vitoke/iternal"/> | ||
<img src = "https://contrib.rocks/image?repo=rimbu-org/rimbu"/> | ||
@@ -77,0 +88,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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
44197
92
Updated@rimbu/common@^0.9.2
Updatedtslib@^2.4.0