@felte/common
Advanced tools
Comparing version 1.1.1 to 1.1.2
/** @ignore */ | ||
function _mapValues(obj, updater) { | ||
const keys = Object.keys(obj); | ||
const keys = Object.keys(obj || {}); | ||
return keys.reduce((acc, key) => (Object.assign(Object.assign({}, acc), { [key]: updater(obj[key]) })), {}); | ||
@@ -5,0 +5,0 @@ } |
@@ -8,3 +8,6 @@ import { _cloneDeep } from './cloneDeep.js'; | ||
const customizer = args.pop(); | ||
const obj = _cloneDeep(args.shift()); | ||
const _obj = args.shift(); | ||
if (typeof _obj === "string") | ||
return _obj; | ||
const obj = _cloneDeep(_obj); | ||
if (args.length === 0) | ||
@@ -15,2 +18,4 @@ return obj; | ||
continue; | ||
if (typeof source === "string") | ||
return source; | ||
let rsValue = customizer(obj, source); | ||
@@ -17,0 +22,0 @@ if (typeof rsValue !== 'undefined') |
@@ -305,3 +305,3 @@ import { Readable, Writable } from "svelte/store"; | ||
/** @ignore */ | ||
declare function _mergeWith<T extends Obj>(...args: any[]): T; | ||
declare function _mergeWith<T>(...args: any[]): T; | ||
/** @ignore */ | ||
@@ -308,0 +308,0 @@ declare function _defaultsDeep<T extends Obj>(...args: any[]): T; |
@@ -1,4 +0,3 @@ | ||
import { Obj } from "../types-27598f9f"; | ||
/** @ignore */ | ||
declare function _mergeWith<T extends Obj>(...args: any[]): T; | ||
declare function _mergeWith<T>(...args: any[]): T; | ||
export { _mergeWith }; |
{ | ||
"name": "@felte/common", | ||
"version": "1.1.1", | ||
"version": "1.1.2", | ||
"description": "Common utilities for Felte packages", | ||
@@ -53,4 +53,3 @@ "author": { | ||
"test:ci": "nyc -n src pnpm test" | ||
}, | ||
"readme": "# @felte/common\n\n[![Tests](https://github.com/pablo-abc/felte/workflows/Tests/badge.svg)](https://github.com/pablo-abc/felte/actions/workflows/test.yml)\n[![Bundle size](https://img.shields.io/bundlephobia/min/@felte/common)](https://bundlephobia.com/result?p=@felte/common)\n[![NPM Version](https://img.shields.io/npm/v/@felte/common)](https://www.npmjs.com/package/@felte/common)\n[![codecov](https://codecov.io/gh/pablo-abc/felte/branch/main/graph/badge.svg?token=T73OJZ50LC)](https://codecov.io/gh/pablo-abc/felte)\n\nCommon utilities and types for Felte and its related packages.\n" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
206137
2136