nl_tokens: Build slug
pl_tokens: function buildSlug ( data , update , done ) { var opt = buildOptions ( data ) // store old slug if ( update ) { _ . get ( data , slugsFieldName ) . push ( _ . get ( data , slugFieldName ) ) } // Get next counter within scope Counters . findByIdAndUpdate ( opt . key , { $inc : { seq : 1 } } , { upsert : true , new : true } , function ( err , res ) { if ( err ) { throw err } var seq = res . seq , slg = opt . slg // If found more than one, then add suffix to the slug if ( seq > 1 ) { slg = slg + '-' + seq } // store new slug _ . <mask> ( data , slugFieldName , slg ) done ( null , slg ) } ) }