Feel free to open a PR on the github repository.
If you want to suggest any other framework or library please open an issue, before the PR.
Please note we have a Code of Conduct, make sure you follow it in all your interactions with the project.
Run yarn contributors
to add yourself to the Readme.md
In order to add a method/section, run yarn new
and follow the instructions.
Please follow the current file structure:
lodash.js
notes.md
spec.js
vanilla.js
Please use the examples in the lodash documentation for the lodash.js files, just add the appropriate import.
import { chunk } from 'lodash'
module.exports = chunk(['a', 'b', 'c', 'd', 'e', 'f', 'g'], 3)
// => [['a', 'b', 'c'], ['d', 'e', 'f'], ['g']]
Note that both lodash and vanilla need to module.exports
the result of their operations: it's hidden on the website, but necessary for testing purposes. If you have more example, feel free to use something like exports.propertyNameThatMakesSense
and change the spec file accordingly.
const expected = { user: 'barney', age: 36, active: true }
const lodash = require('./lodash')
const plain = require('./vanilla')
test('find', () => {
expect(lodash).toEqual(expected)
expect(plain).toEqual(lodash)
})
The notes.md
file is meant to contain external links relevant to the the vanilla implementation (where the implementation was found, if not original, mdn references or such).
Description of the method
Resources: [Spread syntax](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Spread_syntax) [Source](https://www.sitepoint.com/lodash-features-replace-es6/)
yarn
to install dependencies.
yarn start
to launch the watch mode.
yarn test
to launch the tests.
yarn build
to create the built version in the dist
folder.