1.2.0 • Published 1 year ago

1loc v1.2.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

1Loc Lib

Commitizen friendly

A library of witty Javascript one-liner functions. The 1loc.dev website has a collection of useful Javascript one-liners, now you get to use them in your Javascript projects.

One Liners are great, but the rest of your team would appreciate a little more clarity, So we've abstracted them for you, as readeable function names, so you and your teammates can focus on important stuff.

TOC

Getting Started

Install the 1Loc library using yarn or npm

yarn add 1loc

or using npm

npm i 1loc --save

Import Any One-liner and use

import { cloneArray } from '1loc'

const myArray = [{ name: 'me', age: 2}]
const arrayClone = cloneArray(myArray) // [{ name: 'me', age: 2}]

More Examples

import { arrayHasSameValues } from '1loc'

const hasSameValues = arrayHasSameValues([1, 2, 4], [4, 1, 2])

console.log(hasSameValues) // true

Explore a list of possible One-liners

Documentation Here

You can also visit the original 1loc website here.

One Liners

Here's a collection of function definitions and what they do.

Contribution

1.2.0

1 year ago

1.1.9

1 year ago

1.1.8

1 year ago

1.1.7

1 year ago

1.1.1

3 years ago

1.1.6

3 years ago

1.1.5

3 years ago

1.1.4

3 years ago

1.1.3

3 years ago

1.1.2

3 years ago

1.1.0

3 years ago

1.0.9

3 years ago

1.0.8

3 years ago

1.0.2

3 years ago

1.0.7

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago