Wondering what’s next for npm?Check out our public roadmap! »

    sortandfilterdata
    TypeScript icon, indicating that this package has built-in type declarations

    1.0.1 • Public • Published

    sortandfilterdata

    This is A Node.js module that returns sorted array and filtered array.

    Installation

    npm install sortandfilterdata --save
    yarn add sortandfilterdata

    Usage

    Javascript

    var sortandfilterdata = require("sortandfilterdata");
    var sortedArray = sortandfilterdata.sortArray(arr, "sortBy", desc);
    var sortedArray = sortandfilterdata.filterArray(arr, inputValue);
    Output would be an sorted array or filtered array.

    TypeScript

    import { sortArray, filterArray } from "sortandfilterdata";
    var sortedArray = sortArray(arr, "sortBy", desc);
    var sortedArray = filterArray(arr, inputValue);
    Output would be an sorted array or filtered array.
    ``
    
    ## Funtionc Paramerters
    
    ```paramerters
    arr // it should be an array
    sortBy // it should be what value you want sort your array example 'name or age'
    desc  //do u want to an in descenending or ascending value should be in boolean (true or flase)
    
    ```
    

    Install

    npm i sortandfilterdata

    DownloadsWeekly Downloads

    1

    Version

    1.0.1

    License

    MIT

    Unpacked Size

    3 kB

    Total Files

    5

    Last publish

    Collaborators

    • avatar