{"name":"map-reverse","version":"1.0.0","description":"Apply a function to an array from then end to the beginning.","main":"index.js","repository":{"type":"git","url":"git+https://github.com/AndreyBelym/map-reverse.git"},"keywords":["map","iterator","ES2015","ES6"],"author":{"name":"Andrey Belym","url":"belym.a.2105@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/AndreyBelym/map-reverse/issues"},"homepage":"https://github.com/AndreyBelym/map-reverse#readme","files":["index.js"],"scripts":{"test":"mocha"},"devDependencies":{"mocha":"^2.3.4"},"gitHead":"741bc2135a0668f042289d958487255234d0d581","_id":"map-reverse@1.0.0","_shasum":"606acbd6c7a2786dd942269ff1a8b9fafee326d3","_from":".","_npmVersion":"2.14.7","_nodeVersion":"4.2.1","_npmUser":{"name":"belym.a.2105","email":"belym.a.2105@gmail.com"},"dist":{"shasum":"606acbd6c7a2786dd942269ff1a8b9fafee326d3","tarball":"http://registry-npm.ywwl.com/map-reverse/download/map-reverse-1.0.0.tgz","integrity":"sha512-FzKaY7U15FMRKcH17DH791Yot+8V+T2dfFY2ZRltKZSJWB+/nn1JCSftWLr24gLpjfT2XLrqRrWHQHcpWvH+Sw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDzWuQUgHBidUDmsroCQ7bYLFLYF+PQljXMLBvd0cdwFAiBaSnkqpT1YOliAXOjZ+k0qDWLb4eFX/DVnOoPAkGhZ6Q=="}],"size":1607,"noattachment":false,"key":"/map-reverse/-/map-reverse-1.0.0.tgz"},"maintainers":[{"name":"belym.a.2105","email":"belym.a.2105@gmail.com"}],"readme":"# map-reverse\n\n[![Build Status](https://travis-ci.org/AndreyBelym/map-reverse.svg?branch=master)](https://travis-ci.org/AndreyBelym/map-reverse)\n\n*Apply a function to an array from then end to the beginning.*\n\nIt's may be useful when iterating an array and deleting its elements at the same time.\n\n## Install\n```\nnpm install map-reverse\n```\n\n## Usage\nReverse iteration allows you to delete current element from an array when iterating.\n```\nvar mapReverse = require('map-reverse');\n\nvar a = [1, 2, 3, 4, 5, 6, 7];\n\nvar b = mapReverse(a, function (item, index) {\n    if (item % 2)\n        a.splice(index, 1);\n\n    return item;\n});\n\nconsole.log(a);\n//[ 2, 4, 6 ]\n\nconsole.log(b);\n//[ 7, 6, 5, 4, 3, 2, 1 ]\n```\n\n","publish_time":1453382874868,"_cnpm_publish_time":1453382874868,"dist-tags":{"latest":"1.0.1"}}