Mapfun
mapfun is a function that applies a mapping function to an infinite number of input elements, with options to skip certain elements and selectively apply the mapping to keys and/or values of objects. The origin of this function traces back to zikojs
Install / Use
/learn @zakarialaoui10/MapfunREADME
|Langage|Problem|Solution|
|-|-|-|
|Javascript|
|
|
|Python|
|
|
The magic function called mapfun
mapfun
-
mapfunis a function that applies a mapping function to an infinite number of input elements, with options to skip certain elements and selectively apply the mapping to keys and/or values of objects. -
The
mapfunfunction has been developed in JavaScript and Python, offering the same functionality in different programming languages.
Syntax
|Javascript|Python|
|-|-|
|mapfun(callback,{},...args)|mapfun(callback,{},*args)|
Install
|Javascript|Python|
|-|-|
|npm i mapfun|pip install mapfun|
Arguments
fun: The mapping function that will be applied to each element in the input elements.</br>...Xfor javascripters or*Xfor pythonista :The elements to be mapped . </br>{ skip , key , value }: Object with three optional properties :skip: specifies the elements to skip during the mapping process.key: boolean flag indicating whether to apply the mapping function to the keys of objects or not. The default value isfalsevalue: boolean flag indicating whether to apply the mapping function to the values of objects or not. The default value istrue
Supported Datatypes
|Javascript|Support|Python|Support|
|---|-|---|-|
|Number|✅|int|✅|
|String|✅|str|✅|
|Boolean|✅|Boolean|✅|
|Null|✅|float|✅|
|NaN|✅|None|✅|
|Undefined|✅|memoryview|✅|
|BigInt|✅|complex|❌|
|Array|✅|list|✅|
|Object|✅|object|✅|
|Map|✅|dict|✅|
|Set|✅|set|✅|
|WeakMap|❌|tuple|✅|
|WeakSet|❌|bytes|✅|
|ArrayBuffer|✅|bytearray|✅|
|Symbol|❌|range|✅|
Stats
|NPM|PYPI|
|-|-|
||
|
|
|
|
|
|
|
License
This projet is licensed under the terms of MIT License .<br> <img src="https://img.shields.io/github/license/zakarialaoui10/zikojs?color=rgb%2820%2C21%2C169%29">
Related Skills
node-connect
347.2kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
claude-opus-4-5-migration
108.0kMigrate prompts and code from Claude Sonnet 4.0, Sonnet 4.5, or Opus 4.1 to Opus 4.5
frontend-design
108.0kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
model-usage
347.2kUse CodexBar CLI local cost usage to summarize per-model usage for Codex or Claude, including the current (most recent) model or a full model breakdown. Trigger when asked for model-level usage/cost data from codexbar, or when you need a scriptable per-model summary from codexbar cost JSON.
