Socket
Socket
Sign inDemoInstall

@teppeis/multimaps

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@teppeis/multimaps - npm Package Compare versions

Comparing version 1.1.0 to 2.0.0-0

4

dist/src/arraymultimap.d.ts

@@ -1,5 +0,5 @@

import { Multimap } from './multimap';
import { Multimap } from "./multimap";
export declare class ArrayMultimap<K, V> extends Multimap<K, V, V[]> {
constructor(iterable?: Iterable<[K, V]>);
readonly [Symbol.toStringTag]: string;
get [Symbol.toStringTag](): string;
}

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

({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
}
};
return function (d, b) {

@@ -17,2 +17,3 @@ extendStatics(d, b);

Object.defineProperty(exports, "__esModule", { value: true });
exports.ArrayMultimap = void 0;
var multimap_1 = require("./multimap");

@@ -26,5 +27,5 @@ var ArrayMultimap = /** @class */ (function (_super) {

get: function () {
return 'ArrayMultimap';
return "ArrayMultimap";
},
enumerable: true,
enumerable: false,
configurable: true

@@ -60,5 +61,5 @@ });

ArrayOperator.prototype.has = function (value, collection) {
return collection.indexOf(value) > -1;
return collection.includes(value);
};
return ArrayOperator;
}());

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

export { ArrayMultimap } from './arraymultimap';
export { SetMultimap } from './setmultimap';
export { ArrayMultimap } from "./arraymultimap";
export { SetMultimap } from "./setmultimap";
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.SetMultimap = exports.ArrayMultimap = void 0;
var arraymultimap_1 = require("./arraymultimap");
exports.ArrayMultimap = arraymultimap_1.ArrayMultimap;
Object.defineProperty(exports, "ArrayMultimap", { enumerable: true, get: function () { return arraymultimap_1.ArrayMultimap; } });
var setmultimap_1 = require("./setmultimap");
exports.SetMultimap = setmultimap_1.SetMultimap;
Object.defineProperty(exports, "SetMultimap", { enumerable: true, get: function () { return setmultimap_1.SetMultimap; } });

@@ -6,4 +6,4 @@ export declare abstract class Multimap<K, V, I extends Iterable<V>> implements Iterable<[K, V]> {

constructor(operator: CollectionOperator<V, I>, iterable?: Iterable<[K, V]>);
abstract readonly [Symbol.toStringTag]: string;
readonly size: number;
abstract get [Symbol.toStringTag](): string;
get size(): number;
get(key: K): I;

@@ -21,3 +21,3 @@ put(key: K, value: V): boolean;

values(): IterableIterator<V>;
forEach<T>(callback: (this: T, alue: V, key: K, map: this) => void, thisArg?: T): void;
forEach<T>(callback: (this: T | this, alue: V, key: K, map: this) => void, thisArg?: T): void;
[Symbol.iterator](): IterableIterator<[K, V]>;

@@ -24,0 +24,0 @@ asMap(): Map<K, I>;

@@ -29,6 +29,6 @@ "use strict";

};
var __values = (this && this.__values) || function (o) {
var m = typeof Symbol === "function" && o[Symbol.iterator], i = 0;
var __values = (this && this.__values) || function(o) {
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
if (m) return m.call(o);
return {
if (o && typeof o.length === "number") return {
next: function () {

@@ -39,2 +39,3 @@ if (o && i >= o.length) o = void 0;

};
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
};

@@ -58,2 +59,3 @@ var __read = (this && this.__read) || function (o, n) {

Object.defineProperty(exports, "__esModule", { value: true });
exports.Multimap = void 0;
var Multimap = /** @class */ (function () {

@@ -86,3 +88,3 @@ function Multimap(operator, iterable) {

},
enumerable: true,
enumerable: false,
configurable: true

@@ -149,3 +151,3 @@ });

else {
throw new Error('unexpected arguments');
throw new TypeError("unexpected arguments");
}

@@ -183,3 +185,4 @@ return pushed > 0;

function gen() {
var e_4, _a, e_5, _b, _c, _d, _e, key, values, values_2, values_2_1, value, e_5_1, e_4_1;
var _a, _b, _c, key, values, values_2, values_2_1, value, e_4_1, e_5_1;
var e_5, _d, e_4, _e;
return __generator(this, function (_f) {

@@ -189,11 +192,11 @@ switch (_f.label) {

_f.trys.push([0, 11, 12, 13]);
_c = __values(self.map.entries()), _d = _c.next();
_a = __values(self.map.entries()), _b = _a.next();
_f.label = 1;
case 1:
if (!!_d.done) return [3 /*break*/, 10];
_e = __read(_d.value, 2), key = _e[0], values = _e[1];
if (!!_b.done) return [3 /*break*/, 10];
_c = __read(_b.value, 2), key = _c[0], values = _c[1];
_f.label = 2;
case 2:
_f.trys.push([2, 7, 8, 9]);
values_2 = __values(values), values_2_1 = values_2.next();
values_2 = (e_4 = void 0, __values(values)), values_2_1 = values_2.next();
_f.label = 3;

@@ -212,24 +215,24 @@ case 3:

case 7:
e_5_1 = _f.sent();
e_5 = { error: e_5_1 };
e_4_1 = _f.sent();
e_4 = { error: e_4_1 };
return [3 /*break*/, 9];
case 8:
try {
if (values_2_1 && !values_2_1.done && (_b = values_2.return)) _b.call(values_2);
if (values_2_1 && !values_2_1.done && (_e = values_2.return)) _e.call(values_2);
}
finally { if (e_5) throw e_5.error; }
finally { if (e_4) throw e_4.error; }
return [7 /*endfinally*/];
case 9:
_d = _c.next();
_b = _a.next();
return [3 /*break*/, 1];
case 10: return [3 /*break*/, 13];
case 11:
e_4_1 = _f.sent();
e_4 = { error: e_4_1 };
e_5_1 = _f.sent();
e_5 = { error: e_5_1 };
return [3 /*break*/, 13];
case 12:
try {
if (_d && !_d.done && (_a = _c.return)) _a.call(_c);
if (_b && !_b.done && (_d = _a.return)) _d.call(_a);
}
finally { if (e_4) throw e_4.error; }
finally { if (e_5) throw e_5.error; }
return [7 /*endfinally*/];

@@ -245,3 +248,4 @@ case 13: return [2 /*return*/];

function gen() {
var e_6, _a, _b, _c, _d, value, e_6_1;
var _a, _b, _c, value, e_6_1;
var e_6, _d;
return __generator(this, function (_e) {

@@ -251,7 +255,7 @@ switch (_e.label) {

_e.trys.push([0, 5, 6, 7]);
_b = __values(self.entries()), _c = _b.next();
_a = __values(self.entries()), _b = _a.next();
_e.label = 1;
case 1:
if (!!_c.done) return [3 /*break*/, 4];
_d = __read(_c.value, 2), value = _d[1];
if (!!_b.done) return [3 /*break*/, 4];
_c = __read(_b.value, 2), value = _c[1];
return [4 /*yield*/, value];

@@ -262,3 +266,3 @@ case 2:

case 3:
_c = _b.next();
_b = _a.next();
return [3 /*break*/, 1];

@@ -272,3 +276,3 @@ case 4: return [3 /*break*/, 7];

try {
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
if (_b && !_b.done && (_d = _a.return)) _d.call(_a);
}

@@ -288,3 +292,3 @@ finally { if (e_6) throw e_6.error; }

var _d = __read(_c.value, 2), key = _d[0], value = _d[1];
callback.call(thisArg, value, key, this);
callback.call(thisArg === undefined ? this : thisArg, value, key, this);
}

@@ -291,0 +295,0 @@ }

@@ -1,5 +0,5 @@

import { Multimap } from './multimap';
import { Multimap } from "./multimap";
export declare class SetMultimap<K, V> extends Multimap<K, V, Set<V>> {
constructor(iterable?: Iterable<[K, V]>);
readonly [Symbol.toStringTag]: string;
get [Symbol.toStringTag](): string;
}

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

({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
}
};
return function (d, b) {

@@ -17,2 +17,3 @@ extendStatics(d, b);

Object.defineProperty(exports, "__esModule", { value: true });
exports.SetMultimap = void 0;
var multimap_1 = require("./multimap");

@@ -26,5 +27,5 @@ var SetMultimap = /** @class */ (function (_super) {

get: function () {
return 'SetMultimap';
return "SetMultimap";
},
enumerable: true,
enumerable: false,
configurable: true

@@ -31,0 +32,0 @@ });

{
"name": "@teppeis/multimaps",
"description": "Multimap classes for TypeScript and JavaScript",
"version": "1.1.0",
"version": "2.0.0-0",
"author": "Teppei Sato <teppeis@gmail.com>",

@@ -10,3 +10,3 @@ "publishConfig": {

"engines": {
"node": ">=6"
"node": ">=10.17"
},

@@ -21,4 +21,4 @@ "main": "dist/src/index.js",

"clean": "rimraf dist",
"lint": "tslint -c tslint.js 'src/**/*.ts' 'test/**/*.ts'",
"mocha": "mocha -r espower-typescript/guess --watch-extensions ts,tsx 'test/**/*.{ts,tsx}'",
"lint": "eslint 'src/**/*.ts' 'test/**/*.ts'",
"mocha": "mocha -r espower-typescript/guess --extension ts,tsx 'test/*.{ts,tsx}'",
"prepublishOnly": "run-s clean build",

@@ -28,16 +28,13 @@ "test": "run-s clean lint build mocha"

"devDependencies": {
"@types/mocha": "^5.2.5",
"@types/node": "^10.11.4",
"eslint-config-teppeis": "^8.3.0",
"espower-typescript": "^9.0.1",
"mocha": "^5.2.0",
"npm-run-all": "^4.1.3",
"@types/mocha": "^8.2.0",
"@types/node": "^10.17.51",
"eslint": "^7.18.0",
"eslint-config-teppeis": "^12.0.0-6",
"espower-typescript": "^9.0.2",
"mocha": "^8.2.1",
"npm-run-all": "^4.1.5",
"power-assert": "^1.6.1",
"prettier": "1.14.3",
"rimraf": "^2.6.2",
"ts-node": "^7.0.1",
"tslint": "^5.11.0",
"tslint-import-eslint-config": "^1.0.3",
"tslint-plugin-prettier": "^2.0.0",
"typescript": "^3.1.1"
"rimraf": "^3.0.2",
"ts-node": "^9.1.1",
"typescript": "^4.1.3"
},

@@ -44,0 +41,0 @@ "homepage": "https://github.com/teppeis/multimaps#readme",

@@ -7,3 +7,4 @@ # @teppeis/multimaps

![Node.js Version Support][node-version]
[![build status][circleci-image]][circleci-url]
![TypeScript Version Support][ts-version]
[![build status][ci-image]][ci-url]
[![dependency status][deps-image]][deps-url]

@@ -57,5 +58,6 @@ ![License][license]

[deps-url]: https://david-dm.org/teppeis/multimaps
[node-version]: https://img.shields.io/badge/Node.js%20support-v6,v8,v10-brightgreen.svg
[node-version]: https://img.shields.io/badge/Node.js-v10+-brightgreen.svg
[ts-version]: https://img.shields.io/badge/TypeScrpt-v3.8+-brightgreen.svg
[license]: https://img.shields.io/npm/l/@teppeis/multimaps.svg
[circleci-image]: https://circleci.com/gh/teppeis/multimaps.svg?style=shield
[circleci-url]: https://circleci.com/gh/teppeis/multimaps
[ci-image]: https://github.com/teppeis/multimaps/workflows/CI/badge.svg
[ci-url]: https://github.com/teppeis/multimaps/actions?query=workflow%3ACI
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