![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
composite-map
Advanced tools
A module for mapping between multi-part keys and values
npm install composite-map
const { CompositeMap } = require("composite-map");
const map = new CompositeMap();
map.set(["one", 2, true], "test-value");
map.get(["one", 2, true]);
//=> 'test-value'
Type: CompositeMap
Array
Elements to populate the map with. Array
inputs must be in the same form as those created by the
CompositeMap.prototype.toJSON() method.
const map1 = new CompositeMap();
const map2 = new CompositeMap(map1);
const map3 = new CompositeMap([["one", "test-value"], ["two", "test-value-2"]], { keyLength: 1 });
const map4 = new CompositeMap([["one", [[2, "test-value"]]]], { keyLength: 2 });
const map5 = new CompositeMap([["one", [[2, [[true, "test-value"]]]]]], { keyLength: 3 });
Type: Object
Type: "on-write"
"keys"
Default: "keys"
Determines when the keys for the provided CompositeMap
are copied.
"on-write"
Copy keys as changes are made.
"keys"
Copy all keys immediately.
Type: number
Manually specify the length of keys. Only used when constructing using an array of elements.
Removes all key/value pairs from the CompositeMap
object.
Returns true
if an element in the CompositeMap
object existed and has been removed, or false
if the element does
not exist.
Type: Array
The key of the element to be deleted. Shorter keys will delete all elements with matching keys.
Returns a new Iterator
object that contains an array of [key, value]
for each element in the CompositeMap
object.
Calls callbackFn once for each key-value pair present in the CompositeMap
object.
Returns the value associated to the key
, or undefined
if there is none.
Type: Array
The key
of the element to be returned. Shorter keys will return the Map
object associated to the key if one exists.
Returns a boolean asserting whether a value has been associated to the key
in the CompositeMap
object or not.
Type: Array
The key
of the element to be found. Shorter keys will find any elements with matching keys.
Returns a new Iterator
object that contains the keys for each element in the CompositeMap
object.
Sets the value of the key
in the CompositeMap
object. Returns the CompositeMap
object.
Type: Array
The key
to set the value for. All keys must have the same Array
length.
Type: any
The value to store.
Returns a tree-like Array
structure containing all elements in the CompositeMap
object.
const map = new CompositeMap();
map.set(["one", 2, true], "test-value");
const json = JSON.stringify(map);
console.log(json);
//=>[["one", [[2, [[true, "test-value"]]]]]]
const map2 = new CompositeMap(JSON.parse(json), { keyLength: 3 });
Returns a new Iterator
object that contains the values for each element in the CompositeMap
object.
Returns a new Iterator
object that contains an array of [key, value]
for each element in the CompositeMap
object.
To provide better typing support, you can import copies of the CompositeMap
class typed for the length of key
being
used.
import { CompositeMap3 } from "composite-map";
const map = new CompositeMap3<string, number, boolean, string>();
map.set(["one", 2, true], "test-value");
const value: string = map.get(["one", 2, true]);
const subMap: Map<boolean, string> = map.get(["one", 2]);
Some text from this readme was sourced from developer.mozilla.org.
1.1.0 (2019-02-03)
FAQs
A module for mapping between multi-part keys and values.
The npm package composite-map receives a total of 0 weekly downloads. As such, composite-map popularity was classified as not popular.
We found that composite-map demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.