Skip to content

Instantly share code, notes, and snippets.

@florentroques
florentroques / immutable-libraries.md
Created December 17, 2016 02:22 — forked from jlongster/immutable-libraries.md
List of immutable libraries

A lot of people mentioned other immutable JS libraries after reading my post. I thought it would be good to make a list of available ones.

There are two types of immutable libraries: simple helpers for copying JavaScript objects, and actual persistent data structure implementations. My post generally analyzed the tradeoffs between both kinds of libraries and everything applies to the below libraries in either category.

Libraries are sorted by github popularity.

Persistent Data Structures w/structural sharing

##Handle width and max-width To oblige elements to fit parent container, put max-width:100%

img, embed, object, video {
  max-width:100%;
}

max-width overrides width and forces an element to fix a container

#Good practices

  • package.json:
    • give the exact version of a script
    • gitignore node_modules directory

##Packages to use

  • mongoose: writing MongoDB validation, casting and business logic boilerplate
  • express: launch a web server
  • superagent: test http requests
  • Data aggregation is the grouping of data in summary form.
  • Daily Count is the count of orders in a day.
  • Daily Revenue Count is the revenue on orders per day.
  • Product Sum is the total revenue of a product.
  • Subqueries can be used to perform complicated calculations and create filtered or aggregate tables on the fly.
  • Reorder Rate is the ratio of the total number of orders to the number of people making orders.
#!/bin/bash
checkExisting(){
echo "Checking if already existing device on file..."
while read fileLine; do
if [ "$line" = "$fileLine" ]; then
echo "[WARNING] Device already initialized on this system. Nothing to do here"
@florentroques
florentroques / Full Stack JavaScript.md
Last active November 21, 2021 07:30
Learn Full Stack JavaScript Web Development for FREE using resources like YouTube, Udacity and NodeSchool