Indexify an array
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.editorconfig
.gitignore
.jshintrc
.travis.yml
CONTRIBUTING.markdown
LICENSE
README.markdown
gulpfile.js
index.es6
index.js
package.json
test.es6
test.js

README.markdown

fj-indexify

Build Status npm version

Indexify an array

Installation

npm install fj-indexify --save

Usage

var indexify = require('fj-indexify');

const a = ["foo", "bar", "moo"];
const aIdxd = indexify(a);
console.log(aIdxd); // => [[0, "foo"], [1, "bar"], [2, "moo"]]

map((i) => i[0] + i[1], aIdxd); // => ["0foo", "1bar", "2moo"]