text: import { NotImplementedError } from '../extensions/index.js';
  
  /**
   * Given a number, replace this number with
   * the sum of its digits until we get to a one digit number.
   *
   * @param {Number} n
   * @return {Number}
   *
   * @example
   * For 100, the result should be 1 (1 + 0 + 0 = 1)
   * For 91, the result should be 1 (9 + 1 = 10, 1 + 0 = 1)
   *
   */
  export default function getSumOfDigits(n) {
      if (n.toString().split('').length == 1)  {
        return n
      }
      let n1 = n.toString().split('')
      let n2 = n1.map(e => +e)
      let n3 = n2.reduce((i, e) => {return e + i}, 0)
      return getSumOfDigits(n3)
  }
  