1.0.16 • Published 7 years ago

@kengres/config v1.0.16

Weekly downloads
-
License
ISC
Repository
github
Last release
7 years ago

@kengres/config

useful functions, sass mixins and other reusable code for my projects

how to use

css

// in your root scss file import the index.scss from node_modules
@import '@kengres/config/lib/css/index.scss';

javascript functions

  1. groupBy() - receives and array of objects and the property to group by
// examples
const arr = [
  { name: 'Alan', city: 'Berlin' age: 22 },
  { name: 'Bikovkiy', city: 'Moscow' age: 22 },
  { name: 'Maria', city: 'Moscow' age: 22 },
  { name: 'Alan', city: 'Berlin' age: 22 }
];
const grouped = groupBy(arr, 'city'); // property must be a string

// output
{
  Moscow: [
    { name: 'Bikovkiy', city: 'Moscow' age: 22 },
    { name: 'Maria', city: 'Moscow' age: 22 }
  ],
  Berlin: [
    { name: 'Alan', city: 'Berlin' age: 22 },
    { name: 'Alan', city: 'Berlin' age: 22 }
  ]
}
1.0.16

7 years ago

1.0.15

7 years ago

1.0.14

7 years ago

1.0.13

7 years ago

1.0.12

7 years ago

1.0.11

7 years ago

1.0.10

7 years ago

1.0.9

7 years ago

1.0.8

7 years ago

1.0.7

7 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago