Fixed imports for Operators
This commit is contained in:
@@ -109,7 +109,7 @@ export type SortFunction = (totalPages: number) => number[];
|
||||
type Sorts = {
|
||||
[key: string]: SortFunction;
|
||||
};
|
||||
export const sorts: Sorts = Object.freeze({
|
||||
export const Sorts: Sorts = Object.freeze({
|
||||
"REVERSE_ORDER": reverseSort,
|
||||
"DUPLEX_SORT": duplexSort,
|
||||
"BOOKLET_SORT": bookletSort,
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* @param pages A list of page indexes, or the number of total pages in the document (which will be converted into a list of page indexes).
|
||||
* @returns An inverted selection array of page indexes.
|
||||
*/
|
||||
function invertSelection(selection: number[], pages: number|number[]): number[] {
|
||||
export function invertSelection(selection: number[], pages: number|number[]): number[] {
|
||||
const indexes = Array.isArray(pages) ? pages : [...Array(pages).keys()];
|
||||
const pageIndexesCopy = [...indexes];
|
||||
return pageIndexesCopy.filter(x => !selection.includes(x));
|
||||
@@ -16,7 +16,7 @@ function invertSelection(selection: number[], pages: number|number[]): number[]
|
||||
* @param totalPages
|
||||
* @returns
|
||||
*/
|
||||
function parsePageIndexSpecification(specification: string, totalPages: number): number[] {
|
||||
export function parsePageIndexSpecification(specification: string, totalPages: number): number[] {
|
||||
// Translated to JS from the original Java function
|
||||
const pageOrderArr = specification.split(",")
|
||||
const newPageOrder: number[] = [];
|
||||
|
||||
Reference in New Issue
Block a user