Home Reference Source Repository

Function

Static Public Summary
public

When using schQ, you will write a checkout function, which is a function to count how many opperations will be performed before the next stage of the sequence push is to be performed.

public

When using schQ, you will write a preprocess function.

Static Public

public checkout(arr: Object | Array): Number source

import {checkout} from 'schq/src/src/index.js'

When using schQ, you will write a checkout function, which is a function to count how many opperations will be performed before the next stage of the sequence push is to be performed. The default returns the length of an array.

const checkout = (arr) => arr.length;

Params:

NameTypeAttributeDescription
arr Object | Array

get opperation count

Return:

Number

Example:

const schq = new SchQ({
  checkout: (obj) => obj.opperation.length
});

public preprocess(arr: Array): Array source

import preprocess from 'schq/src/src/preprocess.js'

When using schQ, you will write a preprocess function. If you are completely satisfied with your sequence and do not wish to create further consistency just return your sequence.

Params:

NameTypeAttributeDescription
arr Array

Return:

Array

Example:

const schq = new SchQ({
  preprocess: (arr) => ...do something
});