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

@stackbit/utils

Package Overview
Dependencies
Maintainers
15
Versions
313
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@stackbit/utils - npm Package Compare versions

Comparing version 0.2.0 to 0.2.1

4

dist/object-utils.d.ts

@@ -44,3 +44,3 @@ import { PropertyPath } from 'lodash';

*/
export declare function copy(sourceObject: any, sourcePath: PropertyPath, targetObject: any, targetPath: PropertyPath, transform: (value: any) => any): void;
export declare function copy(sourceObject: any, sourcePath: PropertyPath, targetObject: any, targetPath: PropertyPath, transform?: (value: any) => any): void;
/**

@@ -61,3 +61,3 @@ * Copies the value from the `sourceObject` at the specified `sourcePath` to

*/
export declare function copyIfNotSet(sourceObject: any, sourcePath: PropertyPath, targetObject: any, targetPath: PropertyPath, transform: (value: any) => any): void;
export declare function copyIfNotSet(sourceObject: any, sourcePath: PropertyPath, targetObject: any, targetPath: PropertyPath, transform?: (value: any) => any): void;
/**

@@ -64,0 +64,0 @@ * Renames `oldPath` to a `newPath`.

{
"name": "@stackbit/utils",
"version": "0.2.0",
"version": "0.2.1",
"description": "Stackbit utilities",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -62,3 +62,3 @@ import _, { PropertyPath } from 'lodash';

*/
export function copy(sourceObject: any, sourcePath: PropertyPath, targetObject: any, targetPath: PropertyPath, transform: (value: any) => any) {
export function copy(sourceObject: any, sourcePath: PropertyPath, targetObject: any, targetPath: PropertyPath, transform?: (value: any) => any) {
if (_.has(sourceObject, sourcePath)) {

@@ -88,3 +88,3 @@ let value = _.get(sourceObject, sourcePath);

*/
export function copyIfNotSet(sourceObject: any, sourcePath: PropertyPath, targetObject: any, targetPath: PropertyPath, transform: (value: any) => any) {
export function copyIfNotSet(sourceObject: any, sourcePath: PropertyPath, targetObject: any, targetPath: PropertyPath, transform?: (value: any) => any) {
if (!_.has(targetObject, targetPath)) {

@@ -91,0 +91,0 @@ copy(sourceObject, sourcePath, targetObject, targetPath, transform);

Sorry, the diff of this file is not supported yet

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