@compiled/utils
Advanced tools
Comparing version 0.5.2-49bbcb92c1f9420c9ac4a37da8b7f89df69c0034.0 to 0.5.2-4fb311689cb9505d0fd9c48037122c737be44411.0
@@ -8,3 +8,3 @@ /** | ||
*/ | ||
export declare const unique: <TArrItem extends {}>(arr: TArrItem[], getId?: (item: TArrItem) => any) => TArrItem[]; | ||
export declare const unique: <TArrItem extends unknown>(arr: TArrItem[], getId?: (item: TArrItem) => any) => TArrItem[]; | ||
/** | ||
@@ -16,2 +16,2 @@ * Flattens nested arrays into a single array. | ||
*/ | ||
export declare const flatten: <TArr extends {}>(...arrays: TArr[][]) => TArr[]; | ||
export declare const flatten: <TArr extends Record<string, unknown>>(...arrays: TArr[][]) => TArr[]; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.flatten = exports.unique = void 0; | ||
/** | ||
@@ -10,3 +11,3 @@ * Returns an array with unique elements. | ||
*/ | ||
exports.unique = function (arr, getId) { | ||
var unique = function (arr, getId) { | ||
if (getId === void 0) { getId = function (item) { return item; }; } | ||
@@ -21,2 +22,3 @@ return arr.reduce(function (acc, item) { | ||
}; | ||
exports.unique = unique; | ||
/** | ||
@@ -28,3 +30,3 @@ * Flattens nested arrays into a single array. | ||
*/ | ||
exports.flatten = function () { | ||
var flatten = function () { | ||
var arrays = []; | ||
@@ -36,2 +38,3 @@ for (var _i = 0; _i < arguments.length; _i++) { | ||
}; | ||
exports.flatten = flatten; | ||
//# sourceMappingURL=array.js.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.hash = void 0; | ||
/** | ||
@@ -4,0 +5,0 @@ * Quick hash the result of a string input. |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.buildSourceMap = exports.kebabCase = exports.hash = exports.unique = exports.flatten = void 0; | ||
var array_1 = require("./array"); | ||
exports.flatten = array_1.flatten; | ||
exports.unique = array_1.unique; | ||
Object.defineProperty(exports, "flatten", { enumerable: true, get: function () { return array_1.flatten; } }); | ||
Object.defineProperty(exports, "unique", { enumerable: true, get: function () { return array_1.unique; } }); | ||
var hash_1 = require("./hash"); | ||
exports.hash = hash_1.hash; | ||
Object.defineProperty(exports, "hash", { enumerable: true, get: function () { return hash_1.hash; } }); | ||
var kebab_case_1 = require("./kebab-case"); | ||
exports.kebabCase = kebab_case_1.kebabCase; | ||
Object.defineProperty(exports, "kebabCase", { enumerable: true, get: function () { return kebab_case_1.kebabCase; } }); | ||
var source_maps_1 = require("./source-maps"); | ||
exports.buildSourceMap = source_maps_1.buildSourceMap; | ||
Object.defineProperty(exports, "buildSourceMap", { enumerable: true, get: function () { return source_maps_1.buildSourceMap; } }); | ||
//# sourceMappingURL=index.js.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.kebabCase = void 0; | ||
var KEBAB_REGEX = /[A-Z\u00C0-\u00D6\u00D8-\u00DE]/g; | ||
@@ -4,0 +5,0 @@ /** |
@@ -6,2 +6,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.buildSourceMap = void 0; | ||
var source_map_1 = require("source-map"); | ||
@@ -8,0 +9,0 @@ var convert_source_map_1 = __importDefault(require("convert-source-map")); |
{ | ||
"name": "@compiled/utils", | ||
"version": "0.5.2-49bbcb92c1f9420c9ac4a37da8b7f89df69c0034.0", | ||
"version": "0.5.2-4fb311689cb9505d0fd9c48037122c737be44411.0", | ||
"description": "Build time atomic CSS-in-JS. Baked and ready to serve.", | ||
@@ -5,0 +5,0 @@ "author": "Michael Dougall", |
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
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
15038
306