ul
A minimalist utility library.
:cloud: Installation
npm install --save ul
yarn add ul
:clipboard: Example
const Ul = require("ul")
let obj = {
n: null
, v: 1
}
, def = {
n: 1
, v: 10
, a: 20
}
, tmp = null
console.log(tmp = Ul.deepMerge(obj, def))
console.log(tmp === Ul.clone(tmp))
console.log(Ul.home())
console.log(Ul.merge({
foo: {
bar: 42
}
}, {
foo: {
bar: 1
, baz: 7
}
}))
:question: Get Help
There are few ways to get help:
-
Please post questions on Stack Overflow. You can open issues with questions, as long you add a link to your Stack Overflow question.
-
For bug reports and feature requests, open issues. :bug:
-
For direct and quick help, you can use Codementor. :rocket:
:memo: Documentation
merge(dst, src)
One level merge. Faster than deepMerge
.
Params
- ****
dst
: {Object} The destination object. - ****
src
: {Object} The source object (usually defaults).
Return
- Object The result object.
deepMerge()
Recursively merge the objects from arguments, returning a new object.
Usage: Ul.deepMerge(obj1, obj2, obj3, obj4, ..., objN)
Return
- Object The merged objects.
clone(item)
Deep clone of the provided item.
Params
- Anything
item
: The item that should be cloned
Return
- Anything The cloned object
home()
Get the home directory path on any platform. The value can be
accessed using Ul.HOME_DIR
too.
Return
- String The home directory path.
:yum: How to contribute
Have an idea? Found a bug? See how to contribute.
:sparkling_heart: Support my projects
I open-source almost everything I can, and I try to reply to everyone needing help using these projects. Obviously,
this takes time. You can integrate and use these projects in your applications for free! You can even change the source code and redistribute (even resell it).
However, if you get some profit from this or just want to encourage me to continue creating stuff, there are few ways you can do it:
-
Starring and sharing the projects you like :rocket:
-
—I love books! I will remember you after years if you buy me one. :grin: :book:
-
—You can make one-time donations via PayPal. I'll probably buy a coffee tea. :tea:
-
—Set up a recurring monthly donation and you will get interesting news about what I'm doing (things that I don't share with everyone).
-
Bitcoin—You can send me bitcoins at this address (or scanning the code below): 1P9BRsmazNQcuyTxEqveUsnf5CERdq35V6
Thanks! :heart:
:dizzy: Where is this library used?
If you are using this library in one of your projects, add it in this list. :sparkles:
3abn
—A 3ABN radio client in the terminal.abs
—A library to convert a path into an absolute path.ansy
—Cross platform ANSI colors made easy.ascii-heart
(by Nuvi Pannu)—Create ASCII hearts using Node.js.asciify-pixel
—Asciifies a pixel object.asciify-pixel-matrix
—Asciifies a matrix of pixels.bible
—Read the Holy Bible via the command line.bible.js
—The Bible as a NPM module.birthday
—Know when a friend's birthday is coming.blah
—A command line tool to optimize the repetitive actions.bloggify
(by Bloggify)—We make publishing easy.bloggify-cli
(by Bloggify)—We make publishing easy.bloggify-config
(by Bloggify)—Helper module to create Bloggify configuration.bloggify-markdown-adapter
(by Bloggify)—Markdown adapter for Bloggify.bloggify-mongoose
(by Bloggify)—Support for Mongoose models in Bloggify.bloggify-paths
—Helper library for maintaining the Bloggify paths in one place.bloggify-plugin-class
(by Bloggify)—A library for managing plugin objects.bloggify-sequelize
(by Bloggify)—Use Sequelize in Bloggify applications.bloggify-sequelize-adapter
(by Bloggify)—Sequelize adapter for Bloggify.bloggify-social
(by Bloggify)—A Bloggify plugin for sharing articles on social networks.bloggify-sql-adapter
—sql adapter for Bloggify.bloggify-template-renderer
(by Bloggify)—The default template renderer for Bloggify.bloggify-theme-renderer
(by Bloggify)—The default theme renderer for Bloggify.bloggify-tools
—Interactive command line tool to help you win at Bloggify.bloggify-viewer
(by Bloggify)—Connects the CRUD operations with the renderer.bnotify
—A notification system written in NodeJS using the BAT platform.cdnjs-importer
—Easy way to import a library into CDNJS.class-methods
—Get the methods of a JavaScript class.cli-box
—A library to generate ASCII boxes via NodeJScli-circle
—Generate ASCII circles with NodeJS.cli-gh-cal
—GitHub like calendar graphs in command line.cli-graph
—Easily draw function graphs in text mode.cli-pie
—Generate pie charts in terminal and text mode.cli-snow
—Snow, snow, snow! Let it snow, in terminal!cobol
—COBOL bridge for NodeJS which allows you to run COBOL code from NodeJS.compute-size
—Helper tool for resizing the things.diable
—Daemonize the things out.donate.js
—A JavaScript library for creating a friendly way to send money donations.elasticfire
(by Bloggify)—A flexibe and configurable module to connect Firebase with Elasticsearch.electronify
—The simplest way to build Electron apps.emoji-logger
—Logging library based on flat colors and Emoji.engine-builder
(by jillix)—Engine composition parser.engine-flow-types
(by jillix)—Low level library providing Engine flow types.engine-parser
(by jillix)—Engine composition parser.engine-tools
(by jillix)—Engine Tools library and CLI app.enny
(by jillix)—Generate Engine compositions from human-readable inputs.flow-api
(by jillix)—The flow api library and CLI app.fortran
—Fortran bridge for Node.js which allows you to run Fortran code from Node.js.fwatcher
—Watch files for changes.gh-contributions
—A tool that generates a repository which being pushed into your GitHub account creates a nice contributions calendar.gh-fork-source
—Get the source repository of a GitHub fork.gh.js
—Tiny GitHub API wrapper for server and client.ghcal
—See the GitHub contributions calendar of a user in the command line.ghosty
—A wrapper around PhantomJS, downloading the Phantom binary.git-cloner
—Clone multiple git repositories.git-stats
—Local git statistics including GitHub-like contributions calendars.git-stats-importer
—Imports your commits from a repository into git-stats history.github-colors
—GitHub colors and file extensions mappinggithub-stats
—Visualize stats about GitHub users and projects in your terminal.gpm
—npm + git = gpm - Install NPM packages and dependencies from git repositories.gry
—A minimalist NodeJS wrapper for the git
commands. gry
stands for the Git RepositorY.idea
—A lightweight CLI tool and module for keeping ideas in a safe place quick and easy.image-to-ascii
—A Node.JS module that converts images to ASCII art.img-ssim
—Get the structural similarity between two images.jipics
(by jillix)—Node.JS wrapper for jipics image hosting website.jsonrequest
—A tiny library for requesting and getting JSON resources.le-table
—Another NodeJS module for creating ASCII tables.lien
—An easy to use web framework for Node.js.made-in
—Get GitHub projects created by users from a specific location.markdown-templator
(by Geraint White)—Include markdown files in an HTML templatemarkdown-templator-fork
(by Josh Easter)—Include markdown files in an HTML templatematch
—Simplest way to create match memory games.mdify
—Markdown helpers with metadata support.mongof
—Sync MongoDB collections with JSON files.nodeice
—Another PDF invoice generatornp-init
—Easily start a npm package from scratch.npmreserve
—Reserve package names on NPM.oargv
—Turns an object into a bash command.packy
—Set default fields in your package.json files.page-changed
—Call a function when the page body is changed.parent-search
—Search files and folders in parent directories.parrot-bot
—A parrot-like bot you can talk with.phantom-jquery
—Access DOM elements using jQuery in PhantomJS.promptify
—An easy-to-use prompt for Node.js.regarde
—A tiny tool and library to watch commands.rucksack
(by Bloggify)—JavaScript and CSS bundler.share-term
—Share the terminal with your friends.ship-release
—Publish new versions on GitHub and npm with ease.statique
—A Node.JS static server module with built-in cache options and route features.streamp
—mkdir -p combined with streams.template-html
(by Geraint White)—Generate static HTML files from templates and content filestester-init
—Init tests for tester.tilda
—Tiny module for building command line tools.tilda-init
—Init cli applications.tinyreq
—Tiny library for making http(s) requests.tinyreq-cli
—A cli tool for making http(s) requests. CLI for tinyreq.tithe
—Organize and track the tithe payments.transformer
—Transform data using synchronous and asynchronous functions.web-term
—A full screen terminal in your browser.wrabbit
(by jillix)—Wrap scripts by providing the wrapping function.
:scroll: License
MIT © Ionică Bizău