@aesthetic/utils
Advanced tools
Comparing version 0.4.2 to 0.4.3
@@ -35,2 +35,10 @@ import hash from 'string-hash'; | ||
function attempt(callback) { | ||
try { | ||
return callback(); | ||
} catch (_unused) { | ||
return null; | ||
} | ||
} | ||
function objectLoop(object, callback) { | ||
@@ -147,2 +155,2 @@ arrayLoop(Object.keys(object), function (key) { | ||
export { arrayLoop, arrayReduce, deepClone, deepMerge, generateHash, hyphenate, isObject, isSSR, objectCreate, objectLoop, objectReduce, toArray }; | ||
export { arrayLoop, arrayReduce, attempt, deepClone, deepMerge, generateHash, hyphenate, isObject, isSSR, objectCreate, objectLoop, objectReduce, toArray }; |
@@ -7,2 +7,3 @@ /** | ||
import arrayReduce from './arrayReduce'; | ||
import attempt from './attempt'; | ||
import deepClone from './deepClone'; | ||
@@ -19,3 +20,3 @@ import deepMerge from './deepMerge'; | ||
export * from './types'; | ||
export { arrayLoop, arrayReduce, deepClone, deepMerge, generateHash, hyphenate, isObject, isSSR, objectCreate, objectLoop, objectReduce, toArray, }; | ||
export { arrayLoop, arrayReduce, attempt, deepClone, deepMerge, generateHash, hyphenate, isObject, isSSR, objectCreate, objectLoop, objectReduce, toArray, }; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -43,2 +43,10 @@ 'use strict'; | ||
function attempt(callback) { | ||
try { | ||
return callback(); | ||
} catch (_unused) { | ||
return null; | ||
} | ||
} | ||
function objectLoop(object, callback) { | ||
@@ -157,2 +165,3 @@ arrayLoop(Object.keys(object), function (key) { | ||
exports.arrayReduce = arrayReduce; | ||
exports.attempt = attempt; | ||
exports.deepClone = deepClone; | ||
@@ -159,0 +168,0 @@ exports.deepMerge = deepMerge; |
{ | ||
"name": "@aesthetic/utils", | ||
"version": "0.4.2", | ||
"version": "0.4.3", | ||
"description": "Utility functions for Aesthetic.", | ||
@@ -26,3 +26,3 @@ "keywords": [ | ||
}, | ||
"gitHead": "cfd88a991530d5f6eccebb751049529486d41623" | ||
"gitHead": "182d861d9abb7fa11ae1989f5406c6e70125a316" | ||
} |
Sorry, the diff of this file is not supported yet
15962
35
299