@bootstrap-styled/utils
Advanced tools
Comparing version 1.6.3 to 1.6.4
@@ -0,1 +1,8 @@ | ||
## [1.6.4](https://github.com/bootstrap-styled/utils/compare/v1.6.3...v1.6.4) (2018-12-05) | ||
### Bug Fixes | ||
* **documentation:** corrected wrong exmaples and ribbon. ([6043b71](https://github.com/bootstrap-styled/utils/commit/6043b71)) | ||
## [1.6.3](https://github.com/bootstrap-styled/utils/compare/v1.6.2...v1.6.3) (2018-12-05) | ||
@@ -2,0 +9,0 @@ |
@@ -13,5 +13,6 @@ 'use strict'; | ||
* | ||
* parseTransition(['height .35s ease', 'fade .5 ease-out']); | ||
* const parsedTransition = parseTransition(['height .35s ease', 'fade .5 ease-out']); | ||
* | ||
* // OUTPUT ['height', '.35s', 'ease', 'fade', '.5', 'ease-out'] | ||
* // OUTPUT [{ timingFunction: 'height', duration: '.35s', property: 'height'}, { timingFunction: 'ease-out', duration: '.5s', property: 'fade'}] | ||
* | ||
* @returns {Array} will return an array of transition. | ||
@@ -18,0 +19,0 @@ */ |
@@ -106,6 +106,6 @@ 'use strict'; | ||
* import unitUtils from '@bootstrap-styled/utils/lib/unitUtils'; | ||
* const { detectUnit, rmUnit, toPercent } = unitUtils; | ||
* const { detectUnit } = unitUtils; | ||
* | ||
* $spacer = '1rem'; | ||
* const detectedUnit = detectUnit($spacer); | ||
* const spacer = '1rem'; | ||
* const detectedUnit = detectUnit(spacer); | ||
* | ||
@@ -123,3 +123,8 @@ * // OUTPUT 'rem' | ||
* @example | ||
* '$spacer-halved' = rmUnit($spacer, detectedUnit) / 2 + detectedUnit); | ||
* import unitUtils from '@bootstrap-styled/utils/lib/unitUtils'; | ||
* const { detectUnit, rmUnit } = unitUtils; | ||
* | ||
* const spacer = '1rem'; | ||
* const spacerHalved' = rmUnit(spacer, detectedUnit) / 2 + detectedUnit); | ||
* | ||
* // OUTPUT '.5rem' | ||
@@ -137,4 +142,8 @@ */ | ||
* @example | ||
* '$spacer-halved-percentage' = toPercent(rmUnit(toPercent)); | ||
* // OUTPUT '50%' | ||
* import unitUtils from '@bootstrap-styled/utils/lib/unitUtils'; | ||
* const { toPercent } = unitUtils; | ||
* | ||
* const percentage = toPercent(20, 100, 10); | ||
* | ||
* // OUTPUT '20%' | ||
*/ | ||
@@ -141,0 +150,0 @@ ; |
{ | ||
"name": "@bootstrap-styled/utils", | ||
"version": "1.6.3", | ||
"version": "1.6.4", | ||
"description": "UMD module for helper functions used as utilities for bootstrap-styled and other related modules", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -8,5 +8,6 @@ /** | ||
* | ||
* parseTransition(['height .35s ease', 'fade .5 ease-out']); | ||
* const parsedTransition = parseTransition(['height .35s ease', 'fade .5 ease-out']); | ||
* | ||
* // OUTPUT ['height', '.35s', 'ease', 'fade', '.5', 'ease-out'] | ||
* // OUTPUT [{ timingFunction: 'height', duration: '.35s', property: 'height'}, { timingFunction: 'ease-out', duration: '.5s', property: 'fade'}] | ||
* | ||
* @returns {Array} will return an array of transition. | ||
@@ -13,0 +14,0 @@ */ |
@@ -57,6 +57,6 @@ class UnitUtils { | ||
* import unitUtils from '@bootstrap-styled/utils/lib/unitUtils'; | ||
* const { detectUnit, rmUnit, toPercent } = unitUtils; | ||
* const { detectUnit } = unitUtils; | ||
* | ||
* $spacer = '1rem'; | ||
* const detectedUnit = detectUnit($spacer); | ||
* const spacer = '1rem'; | ||
* const detectedUnit = detectUnit(spacer); | ||
* | ||
@@ -91,3 +91,8 @@ * // OUTPUT 'rem' | ||
* @example | ||
* '$spacer-halved' = rmUnit($spacer, detectedUnit) / 2 + detectedUnit); | ||
* import unitUtils from '@bootstrap-styled/utils/lib/unitUtils'; | ||
* const { detectUnit, rmUnit } = unitUtils; | ||
* | ||
* const spacer = '1rem'; | ||
* const spacerHalved' = rmUnit(spacer, detectedUnit) / 2 + detectedUnit); | ||
* | ||
* // OUTPUT '.5rem' | ||
@@ -110,4 +115,8 @@ */ | ||
* @example | ||
* '$spacer-halved-percentage' = toPercent(rmUnit(toPercent)); | ||
* // OUTPUT '50%' | ||
* import unitUtils from '@bootstrap-styled/utils/lib/unitUtils'; | ||
* const { toPercent } = unitUtils; | ||
* | ||
* const percentage = toPercent(20, 100, 10); | ||
* | ||
* // OUTPUT '20%' | ||
*/ | ||
@@ -114,0 +123,0 @@ toPercent = (value, total = 100, decimal = 2) => { // eslint-disable-line arrow-body-style |
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
67248
1458