index.js
function removePostsContent( posts, options ) {

	var _sortPosts = options && typeof options.sortPosts === 'function' ?
				options.sortPosts : sortPosts,
			i = 0,
			len = 0;

	// Posts should be objects separated by commas but not wrapped in []
	posts = JSON.parse( '[' + posts.contents.toString() + ']' );

	len = posts.length;

	for ( i; i < len; i++ ) {

		delete posts[i].content;
	}

	// Sort posts by newest
	posts.sort( _sortPosts );

	return JSON.stringify( posts );
}
function removePostsContent( posts, options ) {

	var _sortPosts = options && typeof options.sortPosts === 'function' ?
				options.sortPosts : sortPosts,
			i = 0,
			len = 0;

	// Posts should be objects separated by commas but not wrapped in []
	posts = JSON.parse( '[' + posts.contents.toString() + ']' );

	len = posts.length;

	for ( i; i < len; i++ ) {

		delete posts[i].content;
	}

	// Sort posts by newest
	posts.sort( _sortPosts );

	return JSON.stringify( posts );
}
function removePostsContent ( posts , options ) { var _sortPosts = options && typeof options . sortPosts === 'function' ? options . sortPosts : sortPosts , i = 0 , len = 0 ; // Posts should be objects separated by commas but not wrapped in [] posts = JSON . parse ( '[' + posts . contents . toString ( ) + ']' ) ; len = posts . length ; for ( i ; i < len ; i ++ ) { delete posts [ i ] . content ; } // Sort posts by newest posts . sort ( _sortPosts ) ; return JSON . stringify ( posts ) ; }
Iterate over posts objects and delete the content property

@param {string} posts
@param {Object} [options]
@returns {string}
Iterate over posts objects and delete the content property