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

@breautek/iterator

Package Overview
Dependencies
Maintainers
2
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@breautek/iterator - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

.nyc_output/2be1ea6c-1cf3-4f79-aa91-e586c1f6f863.json

2

.nyc_output/processinfo/index.json

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

{"processes":{"27b6d405-423a-4ec1-aa73-15cef148deec":{"parent":null,"children":[]}},"files":{"/development/breautek/iterator/src/api.ts":["27b6d405-423a-4ec1-aa73-15cef148deec"],"/development/breautek/iterator/src/Iterator.ts":["27b6d405-423a-4ec1-aa73-15cef148deec"],"/development/breautek/iterator/src/DictionaryIterator.ts":["27b6d405-423a-4ec1-aa73-15cef148deec"]},"externalIds":{}}
{"processes":{"2be1ea6c-1cf3-4f79-aa91-e586c1f6f863":{"parent":null,"children":[]}},"files":{"/development/breautek/iterator/src/api.ts":["2be1ea6c-1cf3-4f79-aa91-e586c1f6f863"],"/development/breautek/iterator/src/Iterator.ts":["2be1ea6c-1cf3-4f79-aa91-e586c1f6f863"],"/development/breautek/iterator/src/DictionaryIterator.ts":["2be1ea6c-1cf3-4f79-aa91-e586c1f6f863"]},"externalIds":{}}
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
exports.__esModule = true;
var tslib_1 = require("tslib");
tslib_1.__exportStar(require("./Iterator"), exports);
tslib_1.__exportStar(require("./DictionaryIterator"), exports);
//# sourceMappingURL=api.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const Iterator_1 = require("./Iterator");
class DictionaryIterator extends Iterator_1.Iterator {
constructor(dictionary) {
super(Object.keys(dictionary));
this.dictionary = dictionary;
exports.__esModule = true;
var tslib_1 = require("tslib");
var Iterator_1 = require("./Iterator");
var DictionaryIterator = (function (_super) {
tslib_1.__extends(DictionaryIterator, _super);
function DictionaryIterator(dictionary) {
var _this = _super.call(this, Object.keys(dictionary)) || this;
_this.dictionary = dictionary;
return _this;
}
next() {
var key = super.next();
DictionaryIterator.prototype.next = function () {
var key = _super.prototype.next.call(this);
return {

@@ -15,5 +18,5 @@ key: key,

};
}
previous() {
var key = super.previous();
};
DictionaryIterator.prototype.previous = function () {
var key = _super.prototype.previous.call(this);
return {

@@ -23,5 +26,6 @@ key: key,

};
}
}
};
return DictionaryIterator;
}(Iterator_1.Iterator));
exports.DictionaryIterator = DictionaryIterator;
//# sourceMappingURL=DictionaryIterator.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
class Iterator {
constructor(collection = [], index = 0) {
exports.__esModule = true;
var Iterator = (function () {
function Iterator(collection, index) {
if (collection === void 0) { collection = []; }
if (index === void 0) { index = 0; }
this._collection = collection;
this._cursor = index;
}
hasNext() {
Iterator.prototype.hasNext = function () {
return !!this._collection[this._getIndex()];
}
next() {
let data = this._collection[this._getIndex()];
};
Iterator.prototype.next = function () {
var data = this._collection[this._getIndex()];
this.incrementIndex();
return data;
}
hasPrevious() {
};
Iterator.prototype.hasPrevious = function () {
return !!this._collection[this.peekPreviousIndex()];
}
previous() {
};
Iterator.prototype.previous = function () {
this.decrementIndex();
let data = this._collection[this._cursor];
var data = this._collection[this._cursor];
return data;
}
reset() {
};
Iterator.prototype.reset = function () {
this.bringToStart();
}
bringToStart() {
};
Iterator.prototype.bringToStart = function () {
this._cursor = 0;
}
bringToEnd() {
};
Iterator.prototype.bringToEnd = function () {
this._cursor = this._collection.length;
}
peekNextIndex() {
};
Iterator.prototype.peekNextIndex = function () {
return this._cursor;
}
peekPreviousIndex() {
};
Iterator.prototype.peekPreviousIndex = function () {
return this._cursor - 1;
}
incrementIndex() {
};
Iterator.prototype.incrementIndex = function () {
this._cursor += 1;
return this._cursor;
}
decrementIndex() {
};
Iterator.prototype.decrementIndex = function () {
this._cursor -= 1;
return this._cursor;
}
_getIndex() {
};
Iterator.prototype._getIndex = function () {
return this._cursor;
}
}
};
return Iterator;
}());
exports.Iterator = Iterator;
exports.default = Iterator;
exports["default"] = Iterator;
//# sourceMappingURL=Iterator.js.map
{
"name": "@breautek/iterator",
"version": "2.0.0",
"version": "2.0.1",
"description": "Iterator implementation",

@@ -5,0 +5,0 @@ "main": "lib/api.js",

{
"compilerOptions": {
"target": "es2015",
"target": "es3",
"module": "commonjs",

@@ -5,0 +5,0 @@ "declaration": true,

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