Catalog npm
Back to packageRELEASE DETAILS

1.1.0

npm

1loc

One line of code as a library

1loc
Published9 Sept 2021
Direct dependencies15
Transitive dependenciesNot calculated

README

Current package documentation

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

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Declared dependencies 15

Native requirements
15 direct targetsNot calculated transitive count
Package / targetRequirementRelationship
module-alias
Environment
{
  "local_name": "module-alias",
  "alias": false,
  "peer_metadata": null
}
^2.2.2runtime
@babel/core
Environment
{
  "local_name": "@babel/core",
  "alias": false,
  "peer_metadata": null
}
^7.15.5development
@babel/preset-env
Environment
{
  "local_name": "@babel/preset-env",
  "alias": false,
  "peer_metadata": null
}
^7.15.4development
@babel/preset-typescript
Environment
{
  "local_name": "@babel/preset-typescript",
  "alias": false,
  "peer_metadata": null
}
^7.15.0development
@types/jest
Environment
{
  "local_name": "@types/jest",
  "alias": false,
  "peer_metadata": null
}
^27.0.1development
babel-jest
Environment
{
  "local_name": "babel-jest",
  "alias": false,
  "peer_metadata": null
}
^27.1.0development
babel-plugin-module-resolver
Environment
{
  "local_name": "babel-plugin-module-resolver",
  "alias": false,
  "peer_metadata": null
}
^4.1.0development
commitizen
Environment
{
  "local_name": "commitizen",
  "alias": false,
  "peer_metadata": null
}
^4.2.4development
cz-conventional-changelog
Environment
{
  "local_name": "cz-conventional-changelog",
  "alias": false,
  "peer_metadata": null
}
^3.3.0development
cz-emoji
Environment
{
  "local_name": "cz-emoji",
  "alias": false,
  "peer_metadata": null
}
^1.3.1development
jest
Environment
{
  "local_name": "jest",
  "alias": false,
  "peer_metadata": null
}
^27.1.0development
jest-module-name-mapper
Environment
{
  "local_name": "jest-module-name-mapper",
  "alias": false,
  "peer_metadata": null
}
^0.1.5development
ts-node
Environment
{
  "local_name": "ts-node",
  "alias": false,
  "peer_metadata": null
}
^10.2.1development
tsconfig-paths
Environment
{
  "local_name": "tsconfig-paths",
  "alias": false,
  "peer_metadata": null
}
^3.11.0development
typescript
Environment
{
  "local_name": "typescript",
  "alias": false,
  "peer_metadata": null
}
^4.4.2development

Distribution files

1 collected
Distribution 1

Source distribution

Source file
Checksums from source
{
  "shasum": "404e7f96bab288513999f81b1765d578e5ebf7da",
  "integrity": "sha512-EyCjKOFLTvpSvhfjyo31L94NTzjEjddY8iKSflNpsr5jR4za6EHV3JomQockZIwJ6EmEdmozeORfM7a76fYl5w==",
  "tarball": "https://registry.npmjs.org/1loc/-/1loc-1.1.0.tgz",
  "fileCount": 141,
  "unpackedSize": 512620,
  "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhOW4pCRA9TVsSAnZWagAAbp0P/32kX3G62TKDk9kvoW1f\nSBCtinl8DHhk0s2XT1jd8hDRLZKk0s42KFWM3xlPFOOw+U62DdVIP6gHAY1+\n9hPpE6NBk5jtnMPy8rWxlP9lly7cuSl75/r2TAggtZdy6L6PpBSncFE5c2ED\nWT4MvHIzLqkLcUydzbUALhZfDJdUvzseRAIKpaSJFmp8ductGsomMp+HZADw\nNmEbTgm/64758HRFv7chqji8E5Gpo7E730NvQKUBHMA/fSIpbfsnG95QwfFg\nveOqD6tLw8pP6KJHKdIbq/J+B8m0KSefhiek7kdH9iPBlvY9GYW6EtZIGDRy\nzPXRn6Kqn75QQJlkeVzmH9Bk9dxeY1ceLT+pei3XBdCWeH2lez8cerKXPg9/\nbv1TSjqfLirxl1d0ExjGoAVKZ+y3DwoBteqz7jMNpbp773zdwKSzyE6KKo8T\npEZ8qPn9FLlR/jvL3Qpf7zRg2fgr4m/yZyacAwIQ1OEhffJV3IYjZkMeP1VP\n8hz3zTTxJpvGnIi8MwWjff2M/mCBlCWCq2u87xCVDevHM2uykwZIfquJwVVI\nP5pG+xkG5rJMYV3kgUAKFqYgvP5whwDg77PznehiTaVPqKLt2xZYNhMImKO1\nKWDEsB8T4jWHhlBxSOWb2ZyI0GBHGbBpy0hMvEIf9yk/SEOXQOnQPZZ+vU+c\nLzUj\r\n=OyDX\r\n-----END PGP SIGNATURE-----\r\n",
  "signatures": [
    {
      "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
      "sig": "MEQCIHAm3F3/Hw3L7f3Ihy+YbhLligetUCIfdOgSGZzlVl2OAiAZTVeUsWDW+mlF0P385vxBF24pS44hws/s6kaqyTIDtQ=="
    }
  ]
}

Repository

PENDING
martinsonuoha/1loc-lib

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 18:31 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package_version:c74b057c2e9976032f814fbf6a2bb7a3a962d93960d9b3bac4c729da2d78d193

Other collected versions

1.2.05 Apr1.1.95 Apr1.1.85 Apr1.1.75 Apr1.1.622 Sept1.1.522 SeptView all collected versions →