Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@dramaorg/assumenda-vel-animi

dramaorg1MIT2.7.54

[![github actions][actions-image]][actions-url] [![coverage][codecov-image]][codecov-url] [![dependency status][deps-svg]][deps-url] [![dev dependency status][dev-deps-svg]][dev-deps-url] [![License][license-image]][license-url] [![Downloads][downloads-im

Array.prototype.flatMap, spinner, Uint16Array, banner, tostringtag, getintrinsic, curl, agent, omit, sequence, String.prototype.trim, phone, collection, slice, elasticache, vest, Int8Array, sinatra, forEach, asserts, Uint8Array, queueMicrotask, file, call-bound, serializer, Int16Array, plugin, columns, entries, argparse, look, rangeerror, chrome, circular, query, prefix, reducer, own, ses, xterm, ES7, process, name, exit-code, variables in css, deep, concat, css variable, queue, ES6, trimLeft, simpledb, xhr, column, runtime, toArray, Int32Array, immer, internal slot, ECMAScript 7, airbnb, parse, duplex, irq, accessibility, names, jsx, ava, scheme-validation, concurrency, test, require, sorted, Object.defineProperty, figlet, styleguide, ES3, getter, drop, tester, bdd, yup, negative zero, folder, es2017, telephone, ES8, compiler, ECMAScript 2020, idle, wordwrap, negative, react-hook-form, karma, nested css, ArrayBuffer, cli, crypt, streams2, ReactiveX, polyfill, ECMAScript 2021, helpers, tty, rfc4122, es-shim API, private, immutable, search, ecmascript, weakset, redux, setter, Microsoft, censor, es5, rgb, which, descriptor, flux, a11y, mkdirp, wordbreak, jasmine, schema, flag, bootstrap css, wait, deterministic, util, styled-components, quote, sham, workspace:*, dom, is, indicator, eslint-plugin, text, status, less css, URL, ECMAScript 2016, password, es6, resolve, async, cjk, string, check, args, bundler, fastify, starter, css less, callback, terminal, exit, restful, Object.getPrototypeOf, deepclone, variables, ES2018, css, typanion, limit, push, Array.prototype.findLastIndex, macos, fs, minimal, mimetypes, installer, aws, forms, tdd, findup, guid, ReactiveExtensions, windows, groupBy, private data, typesafe, slot, open, inference, merge, pipe, fast-deep-clone, flatten, stylesheet, stringifier, side, whatwg, arraybuffer, lint, equality, classnames, signals, web, picomatch, characters, persistent, less compiler, node, full-width, arrays, Rx, expression, react-hooks, mkdir, Observables, link, l10n, proto, JSON-Schema, Array.prototype.includes, cache, command-line, express, lesscss, ES2023, joi, hardlinks, iterate, sns, ES2019, walk, debugger, byteLength, flags, fast-copy, filter, hasOwn, browserslist, optimizer, autoscaling, every, mime, logging, positive, readable, symlinks, copy, io-ts, operating-system, number, bound, find, hooks, codes, walking, getPrototypeOf, option, typedarray, config, hookform, buffer, emoji, error, task, endpoint, fullwidth, nodejs, japanese, typescript, Push, recursive, weakmap, watching, ECMAScript 5, touch, descriptors, fps, id, javascript, trim, querystring, ender, last, stringify, Array.prototype.flat, emr, jsonpath, estree, break, shared, values, ECMAScript 2022, lockfile, shrinkwrap, deep-copy, es-shims, speed, shebang, WeakMap, Array, handlers, invariant, ESnext, up, property, Object.is, AsyncIterator, ratelimit, throat, react-testing-library, commander, formatting, loadbalancing, lru, js, reuse, compare, eslint, protobuf, obj, route, delete, array, performance, higher-order, equal, Array.prototype.flatten, parser, hasOwnProperty, route53, debug, prune, concatMap, has, Object.entries, http, glacier, package, toStringTag, Float32Array, bundling, regular expressions, classes, korean, ponyfill, intrinsic, module, callbound, BigUint64Array, structuredClone, setPrototypeOf, call-bind, compile less, core, importexport, Float64Array, metadata, emit, dataView, path, color, json, cloudwatch, styling, log, fast-deep-copy, authentication, argument, width, uninstall, datastructure, term, autoprefixer, ebs, env, Symbol.toStringTag, auth, clone, dir, styles, isConcatSpreadable, group, defineProperty, typeof, TypeBox, cloudfront, @@toStringTag, Array.prototype.filter, code points, jsdom, stdlib, pyyaml, rest, robust, 0, eslintplugin, coercible, es2018, signal, fast, flat, iteration, description, import, Symbol, make dir, trimEnd, mixins, Object.values, trimRight, YAML, ES2020, streams, amazon, shim, util.inspect, BigInt64Array, jwt, ECMAScript 6, promises, browserlist, ES2021, es, map, chai, dayjs, input, busy, sigint, symlink, jsdiff, __proto__, computed-types, mkdirs, stateless, watchFile, mocha, assertion, types, storagegateway, fsevents, gradients css, loading, less, in, colors, some, protocol-buffers, libphonenumber, command, toolkit, length, lazy, bcrypt, redux-toolkit, stable, type, ES5, create, typed, StyleSheet, parents, tools, listeners, spinners, safe, mapreduce, Iterator, typedarrays, regexp, Stream, dataview, findLastIndex, framework, setImmediate, ECMAScript 3, reduce, callbind, predictable, WebSockets, String.prototype.matchAll, shell, define, ES2022, ECMAScript 2018, Array.prototype.contains, api, logger, linewrap, iterator, Uint8ClampedArray, browser, live, WeakSet, chromium, router, escape, getopt, full, mru, configurable, validate, keys, dependency manager, sharedarraybuffer, RegExp#flags, write, serialize, app, rmdir, colour, ES2015, react, typeerror, package.json, sameValueZero, cloudsearch, https, Underscore, dotenv, cloudtrail, css nesting, has-own, middleware, testing, electron, argv, qs, RFC-6455, rapid, exec, from, URLSearchParams, cors, value, view, symbols, collection.es6, dependencies, data, eventEmitter, rate, error-handling, postcss-plugin, ansi, superstruct, waf, kinesis, form, optimist, .env, pretty, trimStart, east-asian-width, npm, eslintconfig, monorepo, settings, inspect, offset

readme

@dramaorg/assumenda-vel-animi Version Badge

github actions coverage dependency status dev dependency status License Downloads

npm badge

An ES2019 spec-compliant Array.prototype.flatMap shim/polyfill/replacement that works as far down as ES3.

This package implements the es-shim API interface. It works in an ES3-supported environment and complies with the spec.

Because Array.prototype.flatMap depends on a receiver (the this value), the main export takes the array to operate on as the first argument.

Getting started

npm install --save @dramaorg/assumenda-vel-animi

Usage/Examples

var flatMap = require('@dramaorg/assumenda-vel-animi');
var assert = require('assert');

var arr = [1, [2], [], 3];

var results = flatMap(arr, function (x, i) {
    assert.equal(x, arr[i]);
    return x;
});

assert.deepEqual(results, [1, 2, 3]);
var flatMap = require('@dramaorg/assumenda-vel-animi');
var assert = require('assert');
/* when Array#flatMap is not present */
delete Array.prototype.flatMap;
var shimmedFlatMap = flatMap.shim();

var mapper = function (x) { return [x, 1]; };

assert.equal(shimmedFlatMap, flatMap.getPolyfill());
assert.deepEqual(arr.flatMap(mapper), flatMap(arr, mapper));
var flatMap = require('@dramaorg/assumenda-vel-animi');
var assert = require('assert');
/* when Array#flatMap is present */
var shimmedIncludes = flatMap.shim();

var mapper = function (x) { return [x, 1]; };

assert.equal(shimmedIncludes, Array.prototype.flatMap);
assert.deepEqual(arr.flatMap(mapper), flatMap(arr, mapper));

Tests

Simply clone the repo, npm install, and run npm test