Skip to content

vbrajon/rawjs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

77 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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()