This library is deprecated. Please switch to @ezez/utils.
Latest documentation of deprecated version can be found here: documentation.
npm install bottom-line-utils
Library comes with basic TypeScript support. Some very dynamic methods (like get/set) requires typecasting, and I can't do much about it. Those shouldn't be often needed with clean code and TypeScript anyway.
Both ESM and CJS code is bundled within library. With recent Node.js and/or bundlers you will get optimized ESM code automatically and older stuff will fallback to CJS code.
Lodash complexity that causes big bundle sizes just for using single function. Lodash is trying to cover each possible
use case, even very rare while typical observed use case of lodash is basic methods used on basic data. As an example,
let's take a _.pick
method that simply returns an object, based on source object, with just some properties copied.
Easy, right? Few lines of code? Lodash makes that 114 imports!
bottom-line
aims to:
map
/forEach
etc.),get
),Underscore character is often used for utils JS libraries. Dollar is taken by jQuery and other DOM related libraries. Others easy to type on standard layout keyboard, non a-z characters aren't valid JS variable name starters. "Underscore" is taken. Low-dash ("lodash") is taken. How else could I name a line on the bottom?
Oh, about npm name. bottom-line
is free. But NPM encourages to use it just until you try to publish the package. Then
it says the name is too similar to another package (not telling which one). It happens to me way too often :( I've run
out of ideas to I just went with bottom-line-utils
.
defaultTo
)Methods will be added as I need them. I am open for suggestions and PRs. See next heading for list of methods that I want to add.
(TODO)
This library is fully unit tested and can be used on production.
MIT
Generated using TypeDoc