New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@aesthetic/utils

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aesthetic/utils - npm Package Compare versions

Comparing version 0.4.1 to 0.4.2

16

esm/index.js
import hash from 'string-hash';
function arrayLoop(array, callback) {
function arrayLoop(array, callback, reverse) {
if (reverse === void 0) {
reverse = false;
}
var length = array.length;

@@ -8,3 +12,4 @@ var i = 0;

while (i < length) {
callback(array[i], i);
var x = reverse ? length - i - 1 : i;
callback(array[x], x);
i += 1;

@@ -52,4 +57,2 @@ }

function deepMerge() {
var result = {};
for (var _len = arguments.length, objects = new Array(_len), _key = 0; _key < _len; _key++) {

@@ -59,2 +62,7 @@ objects[_key] = arguments[_key];

if (objects.length === 1) {
return objects[0];
}
var result = {};
arrayLoop(objects, function (object) {

@@ -61,0 +69,0 @@ if (isObject(object)) {

@@ -1,2 +0,2 @@

export default function arrayLoop<T extends unknown>(array: ArrayLike<T>, callback: (item: T, index: number) => void): void;
export default function arrayLoop<T extends unknown>(array: ArrayLike<T>, callback: (item: T, index: number) => void, reverse?: boolean): void;
//# sourceMappingURL=arrayLoop.d.ts.map

@@ -11,3 +11,7 @@ 'use strict';

function arrayLoop(array, callback) {
function arrayLoop(array, callback, reverse) {
if (reverse === void 0) {
reverse = false;
}
var length = array.length;

@@ -17,3 +21,4 @@ var i = 0;

while (i < length) {
callback(array[i], i);
var x = reverse ? length - i - 1 : i;
callback(array[x], x);
i += 1;

@@ -61,4 +66,2 @@ }

function deepMerge() {
var result = {};
for (var _len = arguments.length, objects = new Array(_len), _key = 0; _key < _len; _key++) {

@@ -68,2 +71,7 @@ objects[_key] = arguments[_key];

if (objects.length === 1) {
return objects[0];
}
var result = {};
arrayLoop(objects, function (object) {

@@ -70,0 +78,0 @@ if (isObject(object)) {

{
"name": "@aesthetic/utils",
"version": "0.4.1",
"version": "0.4.2",
"description": "Utility functions for Aesthetic.",

@@ -26,3 +26,3 @@ "keywords": [

},
"gitHead": "67700b2a4307e451ddb61b3f7ca631080174838f"
"gitHead": "cfd88a991530d5f6eccebb751049529486d41623"
}

Sorry, the diff of this file is not supported yet

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