Observed since 20 Oct, 19:08 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
2belt
Useful utility functions with strong FP support
A library of higher order functions that is immutable, minimalist and versatile
This module is still under internal development. We are working on:
filter(obj, fn(val, key))reject(obj, fn(val, key))map(obj, fn(val, key))remap(obj, fn(val, key))shuffle(arr)sortBy(arr, key, desc?)toPairs(obj)fromPairs(arr)groupBy(arr, keyFn, valFn)Let's try to make it compatible with both CommonJS and ES6 module systems, with the following emphasis:
Possible usage patterns are:
const { filter, reject } = require('2belt');
const filter = require('2belt/filter');
const belt = require('2belt');
import * as belt from '2belt/es';
import { filter, reject } from '2belt/es';
If we ever decide to use module names like Enum, List etc, it would become
const { Enum, List } = require('2belt');
const { filter, reject } = require('2belt/Enum');
const Enum = require('2belt/Enum');
const filter = require('2belt/Enum/filter');
import { Enum, List } from '2belt/es';
For a standard library, making the user import each function individually is somewhat inconvenient. For example, if there are only 4 modules total, the user can always just import those 4 modules and be done, like in Elixir. The downside of housing the functions under modules is that the user has to search through the different modules for a function. Also it is somewhat convenient to have functions that work across different object types.
Decision:
import * as belt from '2belt/es';Download counts and popularity will appear here as the collector receives them.
| Package / target | Requirement | Relationship |
|---|---|---|
terserEnvironment{
"local_name": "terser",
"alias": false,
"peer_metadata": null
} | ^5.13.0 | runtime |
@babel/cliEnvironment{
"local_name": "@babel/cli",
"alias": false,
"peer_metadata": null
} | ^7.17.6 | development |
@babel/coreEnvironment{
"local_name": "@babel/core",
"alias": false,
"peer_metadata": null
} | ^7.17.9 | development |
@babel/preset-envEnvironment{
"local_name": "@babel/preset-env",
"alias": false,
"peer_metadata": null
} | ^7.16.11 | development |
babel-preset-minifyEnvironment{
"local_name": "babel-preset-minify",
"alias": false,
"peer_metadata": null
} | ^0.5.1 | development |
es-checkEnvironment{
"local_name": "es-check",
"alias": false,
"peer_metadata": null
} | ^6.2.1 | development |
eslintEnvironment{
"local_name": "eslint",
"alias": false,
"peer_metadata": null
} | ^8.14.0 | development |
eslint-plugin-es5Environment{
"local_name": "eslint-plugin-es5",
"alias": false,
"peer_metadata": null
} | ^1.5.0 | development |
eslint-plugin-importEnvironment{
"local_name": "eslint-plugin-import",
"alias": false,
"peer_metadata": null
} | ^2.26.0 | development |
Source distribution
{
"integrity": "sha512-TVvJhYcL8FkcVV2oTwnilseKk5VMFKDcXtoR83P3XIiP69NGMds14wYWZ7g2qCmmeUm2Ck1LkNZACsnqKk2Mow==",
"shasum": "c633e55e47e1a571c146424ab8565cd7affdce70",
"tarball": "https://registry.npmjs.org/2belt/-/2belt-1.0.0.tgz",
"fileCount": 5,
"unpackedSize": 5170,
"signatures": [
{
"keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
"sig": "MEUCIApjWY64vYBLOGtjqO/gDs04vsOKwEZo3Kgofuy0HSzQAiEA63HE7NUKs+AYDSLtRGC4ogH2VGmaxMdwF/3qC1HLbMg="
}
],
"npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiabNwACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqHixAAh+xScZG2CixFzRsnLdJDM3IzB9dyi6AZZaknLbIsffVBu/kx\r\n9Fe6QLwbcATLGPbPrM3vRs8rJ9TKA0QJI3JTvG2H3GSY04CB02dIZGSuHRGe\r\nc9hZpgqbBVJqVNc2DnAEkv3OLQi8eGEYyySgjjpBPgD1xglhHVRnGHRzY2VP\r\ngty4zXDYs11c4djmxSZJwA4APQVok7+p8ekz1p+GLeHmgF/5HDj1nwuuPaKF\r\nMEgI8+5eUWnWiq4Nf8UDxjNmpzpiqA4ish0mCZGXQ5BIKVhNuPVqgMsS8XOU\r\n0GpDaulzaAkljfmHbyScaHI5Lci4hJ26z8koZFTaLCE9G8Zv5uku7js+/Xiy\r\nnijeQVNVNhmPdHmkop0mIU6Syssu/dTx221st725XUEIqP8CpFfQTsN+9dQH\r\nwsQIUHy1TEjOYLTcjGKedFFkGfH2F2kk0HwOZ5/FlNeWF0R+QKnFKlGGOUSU\r\nTcHipDNeRv4Smg2ZkRmhCKzZDAh8bRyMo8SiLORINclN2uz78w/8sOFj/rv3\r\nxO04iH5zvMkQ5uelSTipcr+GJvGqFnZGPgjK4TGC7nN96BVYB6jjHdDXBF0G\r\njtL67JPdC80Ote+pzYooMLLYrJdlpV08piW330hKZCWAA1a9FWtdO+FkuKo5\r\nXNF9ZclOkRfOHziyAqa40bhoFZDrVUg/PWI=\r\n=rkOD\r\n-----END PGP SIGNATURE-----\r\n"
}Observed since 20 Oct, 19:08 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package_version:5fcab73dbd893bedd942f75c446b092f4db1af207c59a585b7d50392b473a8dd