vbrajon / rawjs

🔪 Shortcut Utils

Home Page:https://vbrajon.github.io/rawjs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

rawjs is a shortcut utility library to speed up data transformation, dates manipulation, formatting and function composition.
It is a simpler version of lodash and moment.

Installation:

  • in browser: <script src="https://vbrajon.github.io/rawjs/raw.js"></script>
  • in node: npm i git+https://git@github.com/vbrajon/rawjs.git then import 'rawjs' or require('rawjs')
  • in cli: npm i -g git+https://git@github.com/vbrajon/rawjs.git then raw

It brings:

  • functions: Object.map, Array.group, Function.throttle, Date.plus and 50 more
  • shortcuts: [].find(/Jo/) equals [].find(v => /Jo/.test(v))
  • chaining: [].map('name.length').filter(v => v > 5).sum()
  • immutability: including [].sort() and [].reverse()

It is:

  • easy to learn: ~50 functions / no dependencies / ~250 lines codebase
  • lightweight: ~4k gzipped
  • extensible: Array.first = arr => arr[0] + Object.extend(true) = [].first()

About

🔪 Shortcut Utils

https://vbrajon.github.io/rawjs

License:MIT License


Languages

Language:JavaScript 68.3%Language:HTML 31.7%