@adeira/js
Advanced tools
Comparing version 2.0.0 to 2.1.0
# Unreleased | ||
# 2.1.0 | ||
- Added a new function `rangeMap` which helps with creating an array of elements with predefined length. | ||
# 2.0.0 | ||
@@ -4,0 +8,0 @@ |
@@ -9,7 +9,7 @@ { | ||
"private": false, | ||
"version": "2.0.0", | ||
"version": "2.1.0", | ||
"sideEffects": false, | ||
"dependencies": { | ||
"@babel/runtime": "^7.12.5" | ||
"@babel/runtime": "^7.12.13" | ||
} | ||
} |
@@ -191,1 +191,15 @@ This package contains some useful utilities to help you write JavaScript better. It is a great place where to add these small helpers (_without 3rd party dependencies_) to share them everywhere. | ||
``` | ||
# `rangeMap` | ||
This function is useful when you want to quickly iterate specified number of elements. For example, printing a grid of product placeholders while loading the actual products: | ||
```jsx | ||
import { rangeMap } from '@adeira/js'; | ||
<div className={styles('productsGrid')}> | ||
{rangeMap(12, (i) => ( | ||
<Skeleton key={i} /> | ||
))} | ||
</div>; | ||
``` |
@@ -44,2 +44,8 @@ "use strict"; | ||
}); | ||
Object.defineProperty(exports, "rangeMap", { | ||
enumerable: true, | ||
get: function get() { | ||
return _rangeMap.default; | ||
} | ||
}); | ||
Object.defineProperty(exports, "sprintf", { | ||
@@ -70,4 +76,6 @@ enumerable: true, | ||
var _rangeMap = _interopRequireDefault(require("./rangeMap")); | ||
var _sprintf = _interopRequireDefault(require("./sprintf")); | ||
var _warning = _interopRequireDefault(require("./warning")); |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
32475
34
434
205
0
Updated@babel/runtime@^7.12.13