- Awesome Search
- sindresorhus (Sindre Sorhus)
- sindresorhus/awesome: Curated list of awesome lists
- Best of JavaScript
- JS.coach
- Devhints — TL;DR for developer documentation
- The Modern JavaScript Tutorial
- Exploring JS: JavaScript books for programmers
- Learn ECMAScript6 by doing it
- learning-es6 | Engineering Blog
- Node.js ES2015/ES6, ES2016 and ES2017 support
- ECMAScript 6 compatibility table
- ECMAScript 6: New Features: Overview and Comparison
- Using Object Spread Operator · Redux
- ES6 one liners to show off - Hemanth.HM
- Immutable Javascript using ES6 and beyond
- addyosmani/es6-equivalents-in-es5: WIP - ES6 Equivalents In ES5
- normalize/mz: modernize node.js to current ECMAScript standards
- Lebab: Modernizing JavaScript Code
- How To Use ES6 Arguments And Parameters — Smashing Magazine
- [es6] import, export, default cheatsheet – Hacker Noon
- Babel 7 Documentation
- testing - How do you configure babel to run with different configurations in different environements - Stack Overflow
- Using .babelrc.js today - FatFisz's homepage
- Is there a yo generator or node starter template you use for starting your node packages? · Issue #522 · sindresorhus/ama
- hackathon-starter/README.md at master · sahat/hackathon-starter
- Topic: boilerplate
- next.js/taskfile.js at canary · zeit/next.js
- ollelauribostrom/helloworld-es6
- micro-router/package.json at master · pedronauck/micro-router
{
"main": "dist/index.js",
"jsnext:main": "lib/index.js",
"scripts": {
"release": "np",
"build": "rm -rf dist/* && babel lib --ignore *.test.js --out-dir dist --copy-files",
"test": "xo && nyc ava",
"coverage": "nyc report --reporter=text-lcov | coveralls"
}
}
- node-securepay/package.json at master · maxfi/node-securepay
- bntzio/fast-license: Generate licenses for your open source projects the fast way 🏃💨
- What do you think of lockfiles? · Issue #479 · sindresorhus/ama
- Check package size - https://bundlephobia.com
- sindresorhus/promise-fun: Promise packages, patterns, chat, and tutorials
- sindresorhus/pify: Promisify a callback-style function
- Node.js 8:
util.promisify()
- Promise.denodeify · Issue #501 · meteor/guide
- Metaprogramming in ES6: Symbols and why they're awesome
- Metaprogramming in ES6: Part 2 - Reflect
- Metaprogramming in ES6: Part 3 - Proxies
- Javascript date/time references
- Shave is a zero dependency javascript plugin that truncates multi-line text to fit within an html element based on a set max-height.
- Cleave.js - Format input text content when you are typing
- Hammer.JS - Hammer.js touch events
- iziModal.js - Ajax
- JavaScript unit testing frameworks: Comparing Jasmine, Mocha, AVA, Tape and Jest
- An Overview of JavaScript Testing in 2017 – powtoon-engineering – Medium
- JavaScript End to End Testing Framework | Cypress.io
- node-fixtures
- xojs/xo: ❤️ JavaScript happiness style linter
- Configuring ESLint - ESLint - Pluggable JavaScript linter
- METEOR SPECIFIC CONFIG - Issue #262 · xojs/xo
- Code Style | Meteor Guide
- jfmengels/eslint-plugin-lodash-fp: ESLint rules for lodash/fp
- documentationjs
- matiassingers/awesome-readme: A curated list of awesome READMEs
- zeke/package-json-to-readme: Generate README.md from package.json contents
- JSDoc - Create a README template · jsdoc2md/jsdoc-to-markdown Wiki
- Custom JavaScript Errors in ES6 – Jamund Ferguson – Medium
- javascript - Concise syntax for "do this or throw an error" - Stack Overflow
- Dexie.js - Minimalistic IndexedDB Wrapper
- Browser database comparison
- Browser database comparison - with WorkerPouch
- PouchDB: The Swiss Army Knife of Databases – IBM Watson Data Lab – Medium
- Browser Storage Abuser
- Offline Storage for Progressive Web Apps | Web Fundamentals | Google Developers
Good examples at sales-app-sales: /imports/api/notifications/group-notifications-by-comment-thread.js
-
// --------------- // Using `convert` // --------------- const map = fp.map.convert({cap: false}) // The iteratee is invoked with three arguments: (value, index|key, collection). map(console.log)([1,2,3]) // prints // 1 0 [1, 2, 3] // 2 1 [1, 2, 3] // 3 2 [1, 2, 3] map(console.log)([{a:1, b:2, c:3}]) // --------------- // Using `toPairs` // --------------- _.pipe( _.toPairs, // or `_.entries` _.map(([k, v]) => ({ _id: k, value: v, })) )(someObject)
-
javascript - using lodash .groupBy. how to add your own keys for grouped output? - Stack Overflow
_.pipe( _.groupBy('data.parentId'), _.toPairs, _.map(([k, v]) => ({ _id: k, value: v, })) )(someCollection)
const groupByAndMap = (prop, fn) => _.pipe( _.groupBy(prop), _.toPairs, _.map(([k, v]) => fn(k,v)) )
- javascript - How to use Lodash to merge two collections based on a key? - Stack Overflow
- javascript - How to merge two array of object by using lodash? - Stack Overflow
- How to merge multiple array of object by ID in javascript? - Stack Overflow
const arr1 = [{ userId: '1' }, { userId: '2'}]
const arr2 = [{_id: '2'}, {_id: '1'}]
// =================
// LODASH
_.zipWith(_.merge,_.sortBy(['userId'], arr1), _.sortBy(['_id'], arr2))
// => [ { "userId": "1", "_id": "1" }, { "userId": "2", "_id": "2" } ]
// ES6+
const combine = (prop1, prop2, one, two) =>
one.map(x => ({
...x,
...two.find(y => x[prop1] === y[prop2])
}));
combine('userId', '_id', arr1, arr2)
// => [ { "userId": "1", "_id": "2" }, { "userId": "2", "_id": "2" } ]
combine('userId', '_id', arr1, [{_id: '2'}])
// => [ { "userId": "1" }, { "userId": "2", "_id": "2" } ]
const combineOr = (defaultValue, [prop1, prop2], [one, two]) =>
one.map(x => ({
...x,
...(two.find(y => x[prop1] === y[prop2]) || defaultValue)
}));
combineOr({x: 'y'}, ['userId', '_id'], [arr1, [{_id: '2'}]])
// => [ { "userId": "1", "x": "y" }, { "userId": "2", "_id": "2" } ]
const findOr = (def, prop, match) =>
_.pipe(
_.find(match),
_.propOr(def, prop)
)
const lookup = (defaultValue, prop, match, searchArr, arr) =>
_.map(x => findOr(defaultValue, prop, match(x))(searchArr), arr)
arr.map(x => _.pick(x, 'propOne', 'propTwo'))
_([1, 1, 2, 2, 3]).groupBy().pickBy(x => x.length > 1).keys().value()
_.transform(_.countBy(array), function(result, count, value) {
if (count > 1) result.push(value);
}, []);
- steverydz/build-url
- How to pass url query params? · Issue #256 · github/fetch
- javascript - With the Node URL module, how do you set all search params at once? - Stack Overflow
- How to write powerful schemas in JavaScript – freeCodeCamp.org
- Libraries
- epoberezkin/ajv: The fastest JSON Schema Validator. Supports draft-04/06/07
- diegohaz/schm: Composable schemas for JavaScript and Node.js
- jfairbank/revalidate: Elegant and composable validations
- simple-object-validator - npm
- simple-object-validation - npm
- simple-validate-object - npm
- chriso/validator.js: String validation
- Commits · hapijs/joi
- sindresorhus/ow: Function argument validation for humans
- @sindresorhus/is - npm
- validate.js