Follow these steps to add a function to this library.
- Clone the repo
- Run
npm install
in the repo - Find an issue to contribute to
- Create a branch for the issue
- Create a Gist to implement the function. The Gist should take the form of
fn = function() { ...
. A previous implementation can be referenced to assist. - View the raw Gist, and copy the path from the URL (everything after
https://gist.githubusercontent.com/
) - Create a mapping from the function name to the Gist path in the DangerLinqFunction enum
- Create a mapping from the function enum value to the type signature of the function in the DangerLinqFunctionMapping object
- Add the overload for the enum value to the DangerLinq function
- Add some tests to test both the correct functionality of the function and the expected error conditions. These tests should be placed in a new file named using the
test/<function>.spec.ts
convention. See existing tests for reference. We are using Mocha and Chai for tests and assertions. - Run
npm test
to ensure your tests are passing. - Once tests are passing, create a PR from your issue branch to the
main
branch of DangerLinq!