New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

1loc

Package Overview
Dependencies
Maintainers
2
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

1loc

One line of code as a library

latest
Source
npmnpm
Version
1.2.0
Version published
Weekly downloads
35
600%
Maintainers
2
Weekly downloads
 
Created
Source

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

Keywords

1loc

FAQs

Package last updated on 05 Apr 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts