WARNING: The [sjs-3] engine was deprecated, use [sjs-4] instead.

Collection.prototype.filter()

Return a new collection with selected files only.

Syntax

collection.filter(callback function(File) boolean) Collection

Parameters

callback function(f File) boolean

A callback function to decide if the file f shall be included in the new collection. It shall return true to include the current file, false otherwise.

Description

Return a new collection with files that are selected by a callback function.

Examples

Keep all the pages.