@atomic-layout/core
Advanced tools
Comparing version 0.12.1 to 0.13.0
@@ -368,2 +368,6 @@ 'use strict'; | ||
function capitalize(str) { | ||
return str.replace(/^./, (firstLetter) => firstLetter.toUpperCase()); | ||
} | ||
/** | ||
@@ -378,6 +382,8 @@ * Returns a parsed prop summary, which includes pure prop name, | ||
function parsePropName(originPropName) { | ||
const joinedBreakpointNames = Object.keys(Layout$1.breakpoints).join('|'); | ||
const joinedBehaviors = ['down', 'only'].join('|'); | ||
const breakpointExp = new RegExp(`(${joinedBreakpointNames})$`, 'gi'); | ||
const behaviorExp = new RegExp(`(${joinedBehaviors})$`, 'gi'); | ||
const joinedBreakpointNames = Object.keys(Layout$1.breakpoints) | ||
.map(capitalize) | ||
.join('|'); | ||
const joinedBehaviors = ['down', 'only'].map(capitalize).join('|'); | ||
const breakpointExp = new RegExp(`(${joinedBreakpointNames})$`, 'g'); | ||
const behaviorExp = new RegExp(`(${joinedBehaviors})$`, 'g'); | ||
const behaviorMatch = originPropName.match(behaviorExp); | ||
@@ -748,6 +754,2 @@ const behavior = behaviorMatch ? behaviorMatch[0] : ''; | ||
function capitalize(str) { | ||
return str.replace(/^./, (firstLetter) => firstLetter.toUpperCase()); | ||
} | ||
/** | ||
@@ -754,0 +756,0 @@ * Returns the shallow copy of the given array with |
{ | ||
"name": "@atomic-layout/core", | ||
"description": "Atomic Layout core module", | ||
"version": "0.12.1", | ||
"version": "0.13.0", | ||
"license": "MIT", | ||
@@ -54,3 +54,3 @@ "main": "lib/index.js", | ||
], | ||
"gitHead": "620b5b4757d2633e62044067f64c4bb3845c9aca" | ||
"gitHead": "592fa357f10570cb18e9c1af8112c127bcf6e4e9" | ||
} |
62968
1511