2.1.1 • Published 1 year ago
notate v2.1.1
notate

Resolve dot notation strings
import { notate } from "notate";
const obj = {
top_level: {
nested: {
value: "My Value",
},
},
};
notate(obj, "top_level.nested.value"); // 'My Value'
notate(obj, "top_level.missing.value"); // undefined
Resolve list notation as well
const obj = {
list: [{ name: "Alice" }, { name: "Bob" }],
};
notate(obj, "list[1].name"); // 'Bob'
Supports Map and Set
const map = new Map([["key", { chain: "value" }]]);
notate(map, "key.chain"); // 'value'
const set = new Set([{ chain: "value" }]);
notate(set, "[0].chain"); // 'value'
2.1.1
1 year ago
2.1.0
1 year ago
2.0.0
1 year ago
1.1.2
7 years ago
1.1.1
7 years ago
1.1.0
7 years ago
1.1.0-rc-8b91626
7 years ago
1.1.0-rc-065c799
7 years ago
1.0.1
7 years ago
1.0.0
7 years ago