toolsPane.js
function saveCleanPeople () {
          var cleanPeople

          return Promise.resolve()
            .then(() => {
              cleanPeople = kb.sym(stats.book.dir().uri + 'clean-people.ttl')
              var sts = []
              for (let i = 0; i < stats.uniques.length; i++) {
                sts = sts.concat(kb.connectedStatements(stats.uniques[i], stats.nameEmailIndex))
              }
              var sz = (new $rdf.Serializer(kb)).setBase(stats.nameEmailIndex.uri)
              log('Serializing index of uniques...')
              var data = sz.statementsToN3(sts)

              return kb.fetcher.webOperation('PUT', cleanPeople, { data: data, contentType: 'text/turtle' })
            })
            .then(function () {
              log('Done uniques log ' + cleanPeople)
              return true
            })
            .catch(function (e) {
              log('Error saving uniques: ' + e)
            })
        }
function saveCleanPeople () {
          var cleanPeople

          return Promise.resolve()
            .then(() => {
              cleanPeople = kb.sym(stats.book.dir().uri + 'clean-people.ttl')
              var sts = []
              for (let i = 0; i < stats.uniques.length; i++) {
                sts = sts.concat(kb.connectedStatements(stats.uniques[i], stats.nameEmailIndex))
              }
              var sz = (new $rdf.Serializer(kb)).setBase(stats.nameEmailIndex.uri)
              log('Serializing index of uniques...')
              var data = sz.statementsToN3(sts)

              return kb.fetcher.webOperation('PUT', cleanPeople, { data: data, contentType: 'text/turtle' })
            })
            .then(function () {
              log('Done uniques log ' + cleanPeople)
              return true
            })
            .catch(function (e) {
              log('Error saving uniques: ' + e)
            })
        }
function saveCleanPeople ( ) { var cleanPeople return Promise . resolve ( ) . then ( ( ) => { cleanPeople = kb . sym ( stats . book . dir ( ) . uri + 'clean-people.ttl' ) var sts = [ ] for ( let i = 0 ; i < stats . uniques . length ; i ++ ) { sts = sts . concat ( kb . connectedStatements ( stats . uniques [ i ] , stats . nameEmailIndex ) ) } var sz = ( new $rdf . Serializer ( kb ) ) . setBase ( stats . nameEmailIndex . uri ) log ( 'Serializing index of uniques...' ) var data = sz . statementsToN3 ( sts ) return kb . fetcher . webOperation ( 'PUT' , cleanPeople , { data : data , contentType : 'text/turtle' } ) } ) . then ( function ( ) { log ( 'Done uniques log ' + cleanPeople ) return true } ) . catch ( function ( e ) { log ( 'Error saving uniques: ' + e ) } ) }
Save a new clean version
Save a new clean version