Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Favorite JavaScript Things

Shahar Or’s favorite JavaScript things

To learn more about me, check out my main gist, at http://mightyi.am.

Common things

  • simple APIs
  • testable
  • maintainable
  • composable & reusable
  • comprehensible

JavaScript superset: TypeScript

http://www.typescriptlang.org

  • saves me a ton of work. period.
  • makes my code more reliable. period.
  • period.

Favorite TypeScript options

Read about them here.

  • noImplicitAny
  • strictNullChecks
  • alwaysStrict
  • noUnusedLocals

I should probably try:

  • noImplicitThis
  • noImplicitReturns

Linter / code style: Standard

http://standardjs.com

  • clean
  • wise
  • standard
  • configurable/extensible
  • popular/has chance to win
  • editor/IDE Plugins available
  • trivial to set up
  • based on awesome ESLint
  • I wish it was extensible so I proposed it

Linter / code style for TypeScript: I don't know!

I wish I could use Standard for TypeScript! What shall I do??

Modules in the browser: Webpack

I loved using Browserify but Webpack clearly won.

Immutable state: Immutable.js

Seems like the most correct implementation to me.

Lazy data manipulation: Lazy.js

http://danieltao.com/lazy.js/

If it actually matters, it can improve:

  • speed
  • battery
  • CPU time

Podcasts

I’ve listened retroactively to all of the hundreds of episodes of, and keep listening regularly to:

DOM abstraction: Snabbdom

https://github.com/snabbdom/snabbdom

  • Really just the DOM
  • Modular
  • Fast
  • simple API

Program framework: Cycle.js

https://cycle.js.org

Because:

  • streams!!!
  • I like the abstractions
  • Snabbdom
  • encourages functional

Dependency management: npm (comes with Node.js)

  • Bower is only for front-end and it has virtually zero features.
  • for Node.js and browser
  • essentially tree, practically flat
  • semantic versioning
  • deps, devDeps, peerDeps
  • enterprise option

There are some other stuff out there, like SystemJS, which I haven't tried.

Assertions

  • Whether an object is subset of another: is-subset

Versioning: semantic versioning (SemVer)

http://semver.org

  • Supposedly unambiguous (if followed)
  • Actually tells you something about the changes (whether they could break your usage)

Switching between Node.JS runtimes: Node Version Manager (nvm)

https://github.com/creationix/nvm

  • Does a fine job, is how I see it

I might try nodenv.

Debugging

Testing

Maintenance

Watching file systems

Documentation

Stringify objects

Things I should try

Things I'd like to exist

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment