Code Monkey home page Code Monkey logo

licia's Introduction

中文

Licia

NPM version Build status License

Licia is a utility library that focus on getting daily works done. Unlike other libraries such as underscore, mout, which strictly separates its functions into several categories like array, string and function etc, licia is just a deadly simple collection of over 300 micro modules dealing problems in different aspects. For example, dom manipulation, cookies, class creation, template, date format, ajax, url, event emitter and a bunch more, even Promise.

Benefits

The library focus on getting things done, especially for mobile web development. You don’t need to use Zepto since there is a dom module with jQuery coding style. You don’t need to include a cookie library because a cookie module is already there. You don’t need moment, a dateFormat is good enough to handle most date related work. No need for Promise polyfill because there is already one. Same reason for micro event emitter libs. Ajax is not needed since we have not only ajax but also its Promise version fetch. You don’t need to include underscore anymore just because you want to use its shuffle function. As for mkdirp, the module that has many dependents in npm, there is no need for you to install it into your node_modules folder over and over again…

Usage

Just install licia and use it like any other npm utility modules such as lodash.

npm i licia --save
const 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. (example is required)
  • Must have test.
  • Must have typescript definition.
  • Must specify running environment, node, browser or all.
  • 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.
  • Update index.json and DOC.md by running npm run update.

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

licia's People

Contributors

linkkingjay avatar surunzi avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.