Useful utility collection with zero dependencies
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
$ Move example into separated comment block Oct 18, 2018
a Format code Oct 18, 2018
b Add strToBytes, bytesToStr, rc4 #8 Oct 21, 2018
bin Dev: Use prettier to format code Jun 10, 2018
c Add getPort Oct 19, 2018
d Format code Oct 18, 2018
doc Add strToBytes, bytesToStr, rc4 #8 Oct 21, 2018
e Move example into separated comment block Oct 18, 2018
f Format code Oct 18, 2018
g Add getPort Oct 19, 2018
h Format code Oct 18, 2018
i Format code Oct 18, 2018
j Format code Oct 18, 2018
k Move example into separated comment block Oct 18, 2018
l Format code Oct 18, 2018
lib Release version 1.1.0 Oct 21, 2018
m Add strToBytes, bytesToStr, rc4 #8 Oct 21, 2018
n Move example into separated comment block Oct 18, 2018
o Format code Oct 18, 2018
p Format code Oct 18, 2018
q Format code Oct 18, 2018
r Add strToBytes, bytesToStr, rc4 #8 Oct 21, 2018
s Add strToBytes, bytesToStr, rc4 #8 Oct 21, 2018
script Move example into separated comment block Oct 18, 2018
t Add md5 Oct 21, 2018
u Format code Oct 18, 2018
v Move example into separated comment block Oct 18, 2018
w Format code Oct 18, 2018
z Move example into separated comment block Oct 18, 2018
.eslintrc.js Fix eslint Oct 19, 2018
.eustia.js Remove util comments Oct 19, 2018
.gitignore Ver: v0.12.0 May 4, 2018
.prettierignore Dev: Use prettier to format code Jun 10, 2018
.travis.yml Dev: Switch phantomjs to chrome headless Nov 6, 2017
CHANGELOG.md Release version 1.1.0 Oct 21, 2018
DOC.md Add strToBytes, bytesToStr, rc4 #8 Oct 21, 2018
LICENSE Del: Package lock Jan 5, 2018
README.md Rename doc.md to DOC.md Sep 7, 2018
README_CN.md Update cn docs link Oct 18, 2018
index.json Add strToBytes, bytesToStr, rc4 #8 Oct 21, 2018
package.json Release version 1.1.0 Oct 21, 2018
prettier.config.js Dev: Use prettier to format code Jun 10, 2018

README.md

中文

Licia

NPM version Build status License

Useful utility collection with zero dependencies.

To check all current available functions, click here.

Another Lodash?

No. The goal of Licia is to provide a huge number of useful and small JavaScript codes, not just functions, but also modules and classes. Think of it as a mini version of npm suitable for tiny packages.

Usage

It is recommended to use the official bundler eustia to easily build a customized utility library for your project. But if you don't like it, just install licia and use it like any other npm utility modules such as lodash.

npm i licia --save
var uuid = require('licia/uuid');

console.log(uuid()); // -> 0e3b84af-f911-4a55-b78a-cedf6f0bd815

There is also an online tool to build a customized utility library, check here.

Submitting New Modules

Unable to find one suitable? Fork it on GitHub, add the module and submit a pull request.

Please check Eustia Documentation about how to write an eustia module.

Rules

  • Must have full documentation about usage.
  • Must have test.
  • Must named with a-zA-Z0-9$ characters only.
  • Must not be repeated. (e.g. leftPad is not allowed because there is already a module called lpad)
  • Must within a file, less than 500 lines. (with comments and blank lines counted)

How to Add

  • Fork and clone the repository.
  • npm i && npm link to register licia command in your system.
  • Create a js file named with the module name and its corresponding test file.
  • Write the source code along with the documentaion and test. (documentation is the first block comment written in markdown)
  • licia test <module-name> run the test. (use -b if test should run in a browser)
  • npm run cov for checking the test coverage. (istanbul is required)
  • Update index.json and doc.md by running npm run update.

Now it's time to submit a pull request:)