Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
bb3b02ed74 | |||
bb4820e980 |
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "lik",
|
||||
"version": "1.0.25",
|
||||
"version": "1.0.26",
|
||||
"description": "light little helpers for node",
|
||||
"main": "dist/index.js",
|
||||
"typings": "dist/index.d.ts",
|
||||
|
@ -66,14 +66,14 @@ export class Objectmap<T> {
|
||||
/**
|
||||
* gets an object in the Observablemap and removes it, so it can't be retrieved again
|
||||
*/
|
||||
getOneAndRemove() {
|
||||
getOneAndRemove(): T {
|
||||
return this.objectArray.shift()
|
||||
}
|
||||
|
||||
/**
|
||||
* finds a specific element and then removes it
|
||||
*/
|
||||
findOneAndRemove(findFunction) {
|
||||
findOneAndRemove(findFunction): T {
|
||||
let foundElement = this.find(findFunction)
|
||||
if (foundElement) {
|
||||
this.remove(foundElement)
|
||||
|
Reference in New Issue
Block a user