We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create the ability to give the function a custom function for generating the id value.
Template:
function(item, params) { ... }
item: item in arr params: Object, infos from the addIdToArray(...)
The value of id is the hash from the item.
const addIdToArray = require('addidtoarray'); const customIdFunction = (item, params) => { return {id: hash(item)}; } addIdToArray(['Jeff', 'Maria'], 'name', customIdFunction); /* * result: * [ { id: 'jsoj23...4ecoe', name: 'Jeff'}, ... ] */
The text was updated successfully, but these errors were encountered:
IMPLEMENT custom id function (issue #2)
0ebc874
Development branch: develop
Todos:
customIdFunction
Sorry, something went wrong.
customIdFunction not in the table at Usage/Parameter in README.md
2020-11-04: See changes in branch 'develop' or in CHANGELOGS.md
No branches or pull requests
Custom id function
Description
Create the ability to give the function a custom function for generating the id value.
Template:
Function parameters
item: item in arr
params: Object, infos from the addIdToArray(...)
Example
The value of id is the hash from the item.
The text was updated successfully, but these errors were encountered: