concat-map

WebJar for concat-map

Лицензия

Лицензия

MIT
Группа

Группа

org.webjars.npm
Идентификатор

Идентификатор

concat-map
Последняя версия

Последняя версия

0.0.1
Дата

Дата

Тип

Тип

jar
Описание

Описание

concat-map
WebJar for concat-map
Ссылка на сайт

Ссылка на сайт

http://webjars.org
Система контроля версий

Система контроля версий

https://github.com/substack/node-concat-map

Скачать concat-map

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/org.webjars.npm/concat-map/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>concat-map</artifactId>
    <version>0.0.1</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/concat-map/
implementation 'org.webjars.npm:concat-map:0.0.1'
// https://jarcasting.com/artifacts/org.webjars.npm/concat-map/
implementation ("org.webjars.npm:concat-map:0.0.1")
'org.webjars.npm:concat-map:jar:0.0.1'
<dependency org="org.webjars.npm" name="concat-map" rev="0.0.1">
  <artifact name="concat-map" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='concat-map', version='0.0.1')
)
libraryDependencies += "org.webjars.npm" % "concat-map" % "0.0.1"
[org.webjars.npm/concat-map "0.0.1"]

Зависимости

Библиотека не имеет зависимостей. Это самодостаточное приложение, которое не зависит ни от каких других библиотек.

Модули Проекта

Данный проект не имеет модулей.

concat-map

Concatenative mapdashery.

browser support

build status

example

var concatMap = require('concat-map');
var xs = [ 1, 2, 3, 4, 5, 6 ];
var ys = concatMap(xs, function (x) {
    return x % 2 ? [ x - 0.1, x, x + 0.1 ] : [];
});
console.dir(ys);

[ 0.9, 1, 1.1, 2.9, 3, 3.1, 4.9, 5, 5.1 ]

methods

var concatMap = require('concat-map')

concatMap(xs, fn)

Return an array of concatenated elements by calling fn(x, i) for each element x and each index i in the array xs.

When fn(x, i) returns an array, its result will be concatenated with the result array. If fn(x, i) returns anything else, that value will be pushed onto the end of the result array.

install

With npm do:

npm install concat-map

license

MIT

notes

This module was written while sitting high above the ground in a tree.

Версии библиотеки

Версия
0.0.1