Sha256: a750abb0ba645f27a527f92227575d2302a7cf656f3d298853e882cc909bcd81
Contents?: true
Size: 910 Bytes
Versions: 9
Compression:
Stored size: 910 Bytes
Contents
// ----------------------------------------------------------------------------- // Block Logger // ----------------------------------------------------------------------------- /// Find if a given $block has already been created /// @param {String} $block - Name of the block @function block-exists($block) { @return map-has-key($_bem-log, $block); } /// Log the new $block /// @param {String} $block - Block name @function _bem-log-block($block) { // Check if the block has already been created @if block-exists($block) { @if $bem-throw-errors { @error '`#{$block}` block has already been created'; } @return false; } // Initialize a new block map $new-block: ($block: ('elements': (), 'modifiers': ())); // Update bem log with new block $_bem-log: map-merge($_bem-log, $new-block) !global; // Everything OK @return true; }
Version data entries
9 entries across 9 versions & 1 rubygems