Constructor of KoconutEntry.
Class KoconutEntry implements KoconutEquatable. The equality check process is done by using 'equalsTo method of Entry'.
Other KoconutEntry instance to check equality.
Processes all the chained objects and calls the specified function
block
with the result value as its argument and returns the original result.
1.0.10
import { KoconutArray } from 'koconut'
const mainProcess = async () => {
const koconutNumbers = KoconutArray.of(1,2,3,4,5)
const moreNumbers = await koconutNumbers
.also(result => {
result.push(6)
result.push(7)
result.push(8)
})
console.log(moreNumbers)
// ↑ [1, 2, 3, 4, 5, 6, 7, 8]
}
mainProcess()
Processes all the chained objects and calls the specified function
block
with the result value as its argument and returns the final result
of the block
.
1.0.10
import { KoconutArray } from 'koconut'
const mainProcess = async () => {
const koconutNumbers = KoconutArray.of(1,2,3,4,5)
const firstNumberPlus2 = await koconutNumbers
.first()
.let(result => result + 2)
console.log(firstNumber)
// ↑ 3
}
mainProcess()
Processes all the chained objects ane returns Promise<void>
.
1.0.10
import { KoconutArray } from 'koconut'
const mainProcess = async () => {
const koconutNumbers = KoconutArray.of(1,2,3,4,5)
await koconutNumbers
.forEach(console.log)
.process()
// ↑ 1 2 3 4 5
}
mainProcess()
Processes all the chained object and returns original KoconutEntry instance.
1.0.15
const koconutEntry = await new KoconutEntry(0, 1)
.retrieve()
console.log(koconutEntry)
// ↑ KoconutEntry {
// isValidated: true,
// data: Entry { keyElement: 0, valueElement: 1 }
// }
Processes all the chained objects and return the result.
1.0.10
import { KoconutArray } from 'koconut'
const mainProcess = async () => {
const koconutNumbers = KoconutArray.of(1,2,3,4,5)
const firstNumber = await koconutNumbers
.first()
.yield()
console.log(firstNumber)
// ↑ 1
}
mainProcess()
Generated using TypeDoc
Koconut Wrapper class for Entry.
See