src/options/leading-zero.js
function(ast) {
    let value = this.value;

    ast.traverseByType('number', function(number) {
      if (!value) {
        number.content = number.content.replace(/^0+(?=\.)/, '');
      } else if (number.content[0] === '.') {
        number.content = '0' + number.content;
      }
    });
  }
function(ast) {
    let value = this.value;

    ast.traverseByType('number', function(number) {
      if (!value) {
        number.content = number.content.replace(/^0+(?=\.)/, '');
      } else if (number.content[0] === '.') {
        number.content = '0' + number.content;
      }
    });
  }
function ( ast ) { let value = this . value ; ast . traverseByType ( 'number' , function ( number ) { if ( ! value ) { number . content = number . content . replace ( / ^0+(?=\.) / , '' ) ; } else if ( number . content [ 0 ] === '.' ) { number . content = '0' + number . content ; } } ) ; }
Processes tree node.
@param {node} ast
Processes tree node .