0.0.4 • Published 5 years ago

fabrika v0.0.4

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

CircleCI Language grade: JavaScript

fabrika

fabrika is a javascript utility library for array objects that strongly support tree-shaking and performance.

fabrika is under development.

however some functions can be used and probably will not be changed, it is your own risk to use. Just keep it in your mind.

fabrika

import { uniq, uniqBy, uniqByProps } from "fabrika/uniq";

//uniq
let intArray = [1,2,1]
let result = uniq(intArray)
console.log(result) // [1,2]

// uniqBy
let objectArray = [
    {x:1, y:1},
    {x:2, y:1},
    {x:2, y:1},
]
let result = uniqBy(objectArray, "x")
console.log(result) // [{x:1, y:1}, {x:2, y:1}]

// uniqByProps
let objectArray = [
    {x:1, y:1},
    {x:2, y:1},
    {x:2, y:3},
    {x:1, y:1},
]
let result = uniqBy(objectArray, ["x", "y"])
console.log(result) // [{x:1, y:1}, {x:2, y:1}, {x:2, y:3}]
0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

6 years ago

0.0.1

6 years ago

0.0.5

6 years ago