robinvdvleuten / Shvl
Licence: mit
🚧 Get and set dot-notated properties within an object.
Stars: ✭ 60
Programming Languages
javascript
184084 projects - #8 most used programming language
Labels
Projects that are alternatives of or similar to Shvl
Kvpbase
Scalable, simple RESTful object storage platform, written in C#
Stars: ✭ 43 (-28.33%)
Mutual labels: object
Deep Object Diff
Deep diffs two objects, including nested structures of arrays and objects, and returns the difference. ❄️
Stars: ✭ 515 (+758.33%)
Mutual labels: object
Change By Example
Finds a function that transforms a given object into another given object.
Stars: ✭ 32 (-46.67%)
Mutual labels: object
Simple-YAML
A Java API that provides an easy-to-use way to store data using the YAML format.
Stars: ✭ 68 (+13.33%)
Mutual labels: object
Fmt Obj
Stringifies any javascript object in your console for CLI inspection ✨
Stars: ✭ 428 (+613.33%)
Mutual labels: object
Icaro
Smart and efficient javascript object observer, ideal for batching DOM updates (~1kb)
Stars: ✭ 568 (+846.67%)
Mutual labels: object
python-yamlable
A thin wrapper of PyYaml to convert Python objects to YAML and back
Stars: ✭ 28 (-53.33%)
Mutual labels: object
Object Graph
Provides useful operations on PHP object graphs
Stars: ✭ 443 (+638.33%)
Mutual labels: object
Object.reduce
Reduces an object to a value that is the accumulated result of running each property in the object through a callback. JavaScript/node.js utility.
Stars: ✭ 11 (-81.67%)
Mutual labels: object
Morphism
⚡ Type-safe data transformer for JavaScript, TypeScript & Node.js.
Stars: ✭ 336 (+460%)
Mutual labels: object
Shallow Clone
Make a shallow clone of an object, array or primitive.
Stars: ✭ 23 (-61.67%)
Mutual labels: object
underscore.haz
🔍 _.haz() is like _.has() but this underscore and/or lodash mixin lets you do deep object key existence checking with a dot denoted string, for example 'a.b.c'
Stars: ✭ 13 (-78.33%)
Mutual labels: object
Reacom
ReaCOM has got a lot of tools to use and is related to component object model
Stars: ✭ 57 (-5%)
Mutual labels: object
Dlv
Safe deep property access in 120 bytes. x = dlv(obj, 'a.b.x')
Stars: ✭ 1,071 (+1685%)
Mutual labels: object
Reconstruct
👷 Iterate over properties and merge them into a new object.
Stars: ✭ 11 (-81.67%)
Mutual labels: object
shvl
Get and set dot-notated properties within an object.

Installation
npm install --save shvl
The UMD build is also available on unpkg:
<script src="//unpkg.com/shvl/dist/shvl.umd.js"></script>
This exposes the shlv object as a global.
Usage
import * as shvl from 'shvl';
let obj = {
a: {
b: {
c: 1
d: undefined
e: null
}
}
};
// Use dot notation for keys
shvl.set(obj, 'a.b.c', 2);
shvl.get(obj, 'a.b.c') === 2;
// Or use an array as key
shvl.get(obj, ['a', 'b', 'c']) === 1;
// Returns undefined if the path does not exist and no default is specified
shvl.get(obj, 'a.b.c.f') === undefined;
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributors ✨
Thanks goes to these wonderful people (emoji key):
Robin van der Vleuten 💬 💻 📖 💡 🤔 🚇 👀 ⚠️ |
ajenkinski 💻 |
This project follows the all-contributors specification. Contributions of any kind welcome!
License
The MIT License (MIT). Please see License File for more information.
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].