array-unique-reactjs

1.0.3 • Public • Published

Array Unique Reactjs

Npm package that works to convert data to unique arrays. In other words the package to remove the existing data duplication in the data array.

Example

import getUnique from "array-unique-reactjs";

const prizelips = [
  {
    title: "40M",
    price: 5000,
  },
  {
    title: "100M",
    price: 30000,
  },
  {
    title: "350M",
    price: 100000,
  },
  {
    title: "1B",
    price: 100000,
  },
  {
    title: "2.5B",
    price: 200000,
  },
];

const uniquePrize = getUnique(prizelips, "price");

function Test() {
  return (
    uniquePrize.map((item) => console.log(item.price))
    // Output : 5000, 30000, 100000, 200000
  );
}

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i array-unique-reactjs

      Weekly Downloads

      3

      Version

      1.0.3

      License

      MIT

      Unpacked Size

      1.63 kB

      Total Files

      3

      Last publish

      Collaborators

      • sentot205