Last active
          February 7, 2019 23:50 
        
      - 
      
 - 
        
Save adover/da3e043011667d23dabfcbea8513f3dd to your computer and use it in GitHub Desktop.  
    Map-Deep-Keys
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | /// @name map-deep-keys | |
| /// @group functions | |
| /// Find a list of keys buried deep in a nested map | |
| @function map-deep-keys($map, $keys...) { | |
| @for $i from 1 through length($keys) + 1 { | |
| @if $i == length($keys) + 1 { | |
| @return map-keys($map); | |
| } | |
| $key: nth($keys, $i); | |
| $map: map-get($map, $key); | |
| } | |
| } | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment