Exciting news!Announcing our $4.6M Series Seed. Learn more
Socket
LoveBlogFAQ
Install
Log in

@unction/attach

Package Overview
Dependencies
2
Maintainers
1
Versions
44
Issues
File Explorer

Advanced tools

@unction/attach

A polymorphic way to attach a value to the key on a keyed iterable

    7.13.0latest

Version published
Maintainers
1
Yearly downloads
5,236
increased by26.81%

Weekly downloads

Readme

Source

@unction/attach

Tests Stability Dependencies

A => B => Record<string | number | symbol, B> | Map<A, B> => Record<string | number | symbol, B> | Map<A, B> ObjectKeyType => ValueType => ObjectType => ObjectType MapKeyType => ValueType => MapType => MapType ArrayKeyType => ValueType => ArrayType => ArrayType null => ValueType => SetType => SetType null => ValueType => StreamType => StreamType

A polymorphic way to attach a value to the key on a keyed enumerator. When dealing with a sorted list type and the key is larger than the list, it will append to the list. When the key is an index that already exists it will place the value at that index and shift remaining values to the right.

attach("hello")("world")({}) // => {hello: "world"} attach(3)("x")([1, 2, 3]) // => [1, 2, 3, "x"] attach(1)("x")([1, 2, 3]) // => [1, "x", 2, 3] attach(null)("x")(new Set([1, 2, 3])) // => {1 2 3 "x"} attach(10)("x")([]) // => ["x"] attach(0)("a")("bc") // => "abc" attach(null)("a")(xstream.of("b")) // => a---b--=>

Keywords

FAQs

What is @unction&#x2F;attach?

A polymorphic way to attach a value to the key on a keyed iterable

Is @unction&#x2F;attach popular?

The npm package @unction&#x2F;attach receives a total of 21 weekly downloads. As such, @unction&#x2F;attach popularity was classified as not popular.

Is @unction&#x2F;attach well maintained?

We found that @unction&#x2F;attach demonstrated a not healthy version release cadence and project activity. It has 1 open source maintainer collaborating on the project.

Last updated on 30 Nov 2020
Socket

Product

Subscribe to our newsletter

Get open source security insights delivered straight into your inbox. Be the first to learn about new features and product updates.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc