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 |
|---|---|---|
@babel/cliEnvironment{
"local_name": "@babel/cli",
"alias": false,
"peer_metadata": null
} | ^7.2.3 | development |
@babel/coreEnvironment{
"local_name": "@babel/core",
"alias": false,
"peer_metadata": null
} | ^7.2.2 | development |
@babel/preset-envEnvironment{
"local_name": "@babel/preset-env",
"alias": false,
"peer_metadata": null
} | ^7.2.3 | development |
babel-preset-minifyEnvironment{
"local_name": "babel-preset-minify",
"alias": false,
"peer_metadata": null
} | ^0.5.0 | development |
eslintEnvironment{
"local_name": "eslint",
"alias": false,
"peer_metadata": null
} | ^5.3.0 | development |
eslint-config-airbnb-baseEnvironment{
"local_name": "eslint-config-airbnb-base",
"alias": false,
"peer_metadata": null
} | ^13.1.0 | development |
eslint-plugin-importEnvironment{
"local_name": "eslint-plugin-import",
"alias": false,
"peer_metadata": null
} | ^2.14.0 | development |
undefinedEnvironment{
"local_name": "undefined",
"alias": false,
"peer_metadata": null
} | ^0.1.0 | development |
Source distribution
{
"integrity": "sha512-7r/cqcBseS6fYcKowtL7/4MDfK5EabzKWHvhlgMqTo9tVpzTTAy69/3ZydUWYar/34SPfCb0fwuhKR7/tHhWUw==",
"shasum": "49b30c3e6db62966d5cf0405d2411d2a7a80f1bc",
"tarball": "https://registry.npmjs.org/2belt/-/2belt-0.2.0.tgz",
"fileCount": 23,
"unpackedSize": 9202,
"npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcNlLFCRA9TVsSAnZWagAAlRUP/3sQ+HLgwBNTLle32wsx\n2LVHfC6M4FgjYSCZSL8hhqU4VMdnwpx3Ctw+VLK7IZWKQKilyJYUTkSKt91+\nE28Jbw9JKgDZCd2MJhdsrxihhf9sEGn4+8jZ1t02XO4hUJD9YasMn3vh56/f\n7yCBtaMp/FbliokCEDf7Vs0GTFVNdFbJfqXVkvIzs43YvPPHOIAC7vukSBSw\nypSt/pnVIAbI/xcUYBgvZ5WOFzcxRGxMQdi4wKIHBGQHEyGZg1W4jnIoMb0N\npKJ5VeMZfIzxkeNbFMGCSj1N8Ex6fGkh18Z5rhqLyg+U4nSA+wXGZkB+eG96\n2x+0NxVJYcm02pvvBIMlbkKYjZEM7WKca5+3w05uZwqYCL7iKDSjEFiZQmZp\nFfltWXs21lJVJ38D6iSdTNm9JazbRyV5TL2lfm8FQs0nn/l5RiTXwL8Xx9TG\nybMgmfXHlnGRhFZM3tOZidLtcgtNuebvYLnNkVZAE6qenwbrSRHKDn797EJz\ntbsjhiyhc7MgDFWsdGNrNnMY5N/Dgn+3p/hmk8sP48Jn3H7klMwNG7ykHdyM\nRBTYUrTJ/e0yJYAgpjqm25LFknaMuIAfKiqcYHB8D5SWupeiGYDHfOwCpzeF\nKAHd1rTx0WBYSSQWAMo0BSl+97kTEB5ed1k/ZlR9AAk63fZ32BwH3wYzTcUT\nYvx7\r\n=HJbD\r\n-----END PGP SIGNATURE-----\r\n",
"signatures": [
{
"keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
"sig": "MEQCIDJTHizGfSZW/iIlAr/J0C0A52l4DwstgvTxgDq0pKOOAiBxyjA9I8teU8WXIqhdQs2ru0YW/yJKDdDv0fcBR0LNhw=="
}
]
}Observed since 20 Oct, 19:08 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package_version:4d6384189b1f024dff7bdfde1998d77dfc5c7f0296943c24ffc4654c0d045cb5