Compare commits

..

2 Commits

Author SHA1 Message Date
bb3b02ed74 1.0.26 2016-11-19 23:15:46 +01:00
bb4820e980 improve typings 2016-11-19 23:15:43 +01:00
2 changed files with 3 additions and 3 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "lik", "name": "lik",
"version": "1.0.25", "version": "1.0.26",
"description": "light little helpers for node", "description": "light little helpers for node",
"main": "dist/index.js", "main": "dist/index.js",
"typings": "dist/index.d.ts", "typings": "dist/index.d.ts",

View File

@ -66,14 +66,14 @@ export class Objectmap<T> {
/** /**
* gets an object in the Observablemap and removes it, so it can't be retrieved again * gets an object in the Observablemap and removes it, so it can't be retrieved again
*/ */
getOneAndRemove() { getOneAndRemove(): T {
return this.objectArray.shift() return this.objectArray.shift()
} }
/** /**
* finds a specific element and then removes it * finds a specific element and then removes it
*/ */
findOneAndRemove(findFunction) { findOneAndRemove(findFunction): T {
let foundElement = this.find(findFunction) let foundElement = this.find(findFunction)
if (foundElement) { if (foundElement) {
this.remove(foundElement) this.remove(foundElement)