GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - wavejs/okei: Object Iteration tool

BranchesTags
Open more actions menu

Latest commit

 

History

8 Commits
8 Commits

Folders and files

NameName
Last commit message
Last commit date
.gitignore
.gitignore
 
 
.travis.yml
.travis.yml
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
index.js
index.js
 
 
package-lock.json
package-lock.json
 
 
package.json
package.json
 
 
test.js
test.js
 
 

Repository files navigation

okei Build Status

Object Iteration tool

Usage

const okeiMap = require('okei')('map');

const obj = {
  foo: 'poo',
  bar: 'par',
};

okeiMap(obj, val => val); // returns ['foo', 'bar']
okeiMap(obj, val => obj[val]); // returns ['poo', 'par']
okeiMap('foo', val => val); // returns ['f', 'o', 'o']

const okeiReduce = require('okei')('reduce');

okeiReduce([0, 1, 2, 3], (a, b) => a + b); // returns 6
okeiReduce([[0, 1], [2, 3], [4, 5]], (a, b) => a.concat(b), []); // returns [ 0, 1, 2, 3, 4, 5 ]
okeiReduce(obj, (newObj, key) => {
  newObj[obj[key]] = key;
  return newObj;
}, {}); // returns { poo: 'foo', par: 'bar' }

About

Object Iteration tool

Topics

iterationobjectokei

Resources

Readme
MIT license
Activity
Custom properties

Stars

1 star

Watchers

5 watching

Forks

1 fork
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.