# Function sort

- sort(pckg, data, errors?, references): {
  sorted: any[];
  }

- Generate inserting order for links and values.

  #### Parameters

  - pckg: Package
  - data: any[]
  - errors: any[] = []
  - references: {
    from: string;
    id: string;
    to: string;
    type: string;
    }

    - ##### from: string

    - ##### id: string

    - ##### to: string

    - ##### type: string

  #### Returns {
  sorted: any[];
  }

  - ##### sorted: any[]

  - Defined in work/deeplinks/deeplinks/imports/packager.ts:70