joycss/lib/csslib/cssReader.js
function getLast(isNew, opt_key){
    opt_key = opt_key || 'selectors';
    var items = this.get(opt_key);
    var len = items.length;

    if (isNew){
      len++;
      items.push([]);

      var nest = this.get('nest');
      var nLen = nest.length;
      if (nLen > 1){
        //console.log([nest, nest[nLen - 2], len - 1]);
        //push the new rule to is father
        items[nest[nLen - 2]].push(items[len - 1]);
      }
    }

    return items[len - 1];
  }
function getLast(isNew, opt_key){
    opt_key = opt_key || 'selectors';
    var items = this.get(opt_key);
    var len = items.length;

    if (isNew){
      len++;
      items.push([]);

      var nest = this.get('nest');
      var nLen = nest.length;
      if (nLen > 1){
        //console.log([nest, nest[nLen - 2], len - 1]);
        //push the new rule to is father
        items[nest[nLen - 2]].push(items[len - 1]);
      }
    }

    return items[len - 1];
  }
function getLast ( isNew , opt_key ) { opt_key = opt_key || 'selectors' ; var items = this . get ( opt_key ) ; var len = items . length ; if ( isNew ) { len ++ ; items . push ( [ ] ) ; var nest = this . get ( 'nest' ) ; var nLen = nest . length ; if ( nLen > 1 ) { //console.log([nest, nest[nLen - 2], len - 1]); //push the new rule to is father items [ nest [ nLen - 2 ] ] . push ( items [ len - 1 ] ) ; } } return items [ len - 1 ] ; }
get last item of selectors or properties or values
@param isNew {bool} if isNew, push it an new empty array, if isNew
is null, isNew equal to false
@param opt_key {string} selectors | properties | values
by default opt_key is selectors
get last item of selectors or properties or values