Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

camel-dot-prop-immutable

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

camel-dot-prop-immutable - npm Package Compare versions

Comparing version 1.3.1 to 1.3.2

8

dist/index.js

@@ -16,8 +16,4 @@ "use strict";

function camelDotMatch({ obj, prop }) {
let result = _dotPropImmutable2.default.get(obj, prop);
let result;
if (result) {
return { prop, result };
}
for (let combo of camelCombos(prop)) {

@@ -37,3 +33,3 @@ result = _dotPropImmutable2.default.get(obj, combo);

let regexes = [/\.\w/, /\.[^.]+$/];
let combos = {};
let combos = { [prop]: null };
let ogProp = prop;

@@ -40,0 +36,0 @@

import dot from "dot-prop-immutable"
function camelDotMatch({ obj, prop }) {
let result = dot.get(obj, prop)
let result
if (result) {
return { prop, result }
}
for (let combo of camelCombos(prop)) {

@@ -24,3 +20,3 @@ result = dot.get(obj, combo)

let regexes = [/\.\w/, /\.[^.]+$/]
let combos = {}
let combos = { [prop]: null }
let ogProp = prop

@@ -27,0 +23,0 @@

{
"name": "camel-dot-prop-immutable",
"version": "1.3.1",
"version": "1.3.2",
"description":

@@ -5,0 +5,0 @@ "dot-prop-immutable w/ check for flattened props",

# camel-dot-prop-immutable
This extension to [dot-prop-immutable](/debitoor/dot-prop-immutable) allows `foo.bar.buzz` to match `{ foo: { barBuzz } }` and `{ fooBar: { buzz } }`.
This extension to [dot-prop-immutable](/debitoor/dot-prop-immutable) adds fuzzy matching.
| Props | Matches | Type |
| -------------- | ---------------------------- | ---------------- |
| `foo.bar.buzz` | `{ foo: { bar: { buzz } } }` | Default behavior |
| `foo.bar.buzz` | `{ foo: { barBuzz } }` | Collapse right |
| `foo.bar.buzz` | `{ fooBar: { buzz } }` | Collapse left |
### Example
```js

@@ -6,0 +14,0 @@ import dot from "camel-dot-prop-immutable"

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc