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

@peersyst/react-utils

Package Overview
Dependencies
Maintainers
1
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@peersyst/react-utils - npm Package Compare versions

Comparing version 2.2.2 to 2.2.3

2

./@types/getAttribute.d.ts
import { DeepPick, NestedKeys } from "@peersyst/react-types";
export default function <T extends object, K extends NestedKeys<T>>(obj: T, key: K): DeepPick<T, K> | undefined;
export default function <T extends object, K extends NestedKeys<T>>(obj: T, key: K): DeepPick<T, K>;

@@ -1,4 +0,6 @@

import _typeof from "@babel/runtime/helpers/esm/typeof";
import _toArray from "@babel/runtime/helpers/esm/toArray";
export default function (obj, key) {
// @ts-ignore Not excessively deep (max 10 levels)
export default function (obj, key
// @ts-ignore Not excessively deep (max 10 levels)
) {
var _key$split = key.split("."),

@@ -8,9 +10,7 @@ _key$split2 = _toArray(_key$split),

restKeys = _key$split2.slice(1);
var value = obj[firstKey];
for (var _key in restKeys) {
var _value;
if (_typeof(value) !== "object" || value === null) return undefined;
value = (_value = value) == null ? void 0 : _value[_key];
}
return value;
// @ts-ignore
return restKeys.reduce(function (prev, curr) {
return prev[curr];
}, obj[firstKey]);
}

@@ -1,4 +0,6 @@

import _typeof from "@babel/runtime/helpers/esm/typeof";
import _toArray from "@babel/runtime/helpers/esm/toArray";
export default function (obj, key) {
// @ts-ignore Not excessively deep (max 10 levels)
export default function (obj, key
// @ts-ignore Not excessively deep (max 10 levels)
) {
var _key$split = key.split("."),

@@ -8,9 +10,7 @@ _key$split2 = _toArray(_key$split),

restKeys = _key$split2.slice(1);
var value = obj[firstKey];
for (var _key in restKeys) {
var _value;
if (_typeof(value) !== "object" || value === null) return undefined;
value = (_value = value) == null ? void 0 : _value[_key];
}
return value;
// @ts-ignore
return restKeys.reduce(function (prev, curr) {
return prev[curr];
}, obj[firstKey]);
}

@@ -1,4 +0,6 @@

import _typeof from "@babel/runtime/helpers/esm/typeof";
import _toArray from "@babel/runtime/helpers/esm/toArray";
export default function (obj, key) {
// @ts-ignore Not excessively deep (max 10 levels)
export default function (obj, key
// @ts-ignore Not excessively deep (max 10 levels)
) {
var _key$split = key.split("."),

@@ -8,9 +10,7 @@ _key$split2 = _toArray(_key$split),

restKeys = _key$split2.slice(1);
var value = obj[firstKey];
for (var _key in restKeys) {
var _value;
if (_typeof(value) !== "object" || value === null) return undefined;
value = (_value = value) == null ? void 0 : _value[_key];
}
return value;
// @ts-ignore
return restKeys.reduce(function (prev, curr) {
return prev[curr];
}, obj[firstKey]);
}

@@ -8,5 +8,7 @@ "use strict";

exports["default"] = _default;
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
var _toArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toArray"));
function _default(obj, key) {
// @ts-ignore Not excessively deep (max 10 levels)
function _default(obj, key
// @ts-ignore Not excessively deep (max 10 levels)
) {
var _key$split = key.split("."),

@@ -16,9 +18,7 @@ _key$split2 = (0, _toArray2["default"])(_key$split),

restKeys = _key$split2.slice(1);
var value = obj[firstKey];
for (var _key in restKeys) {
var _value;
if ((0, _typeof2["default"])(value) !== "object" || value === null) return undefined;
value = (_value = value) == null ? void 0 : _value[_key];
}
return value;
// @ts-ignore
return restKeys.reduce(function (prev, curr) {
return prev[curr];
}, obj[firstKey]);
}
{
"name": "@peersyst/react-utils",
"author": "Peersyst",
"version": "2.2.2",
"version": "2.2.3",
"license": "MIT",

@@ -21,3 +21,3 @@ "main": "./node/index.js",

"@babel/runtime": "^7.16.7",
"@peersyst/react-types": "^1.5.0",
"@peersyst/react-types": "^1.5.1",
"validate-color": "^2.2.1"

@@ -24,0 +24,0 @@ },

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