Transforms object properties into an array of arguments ordered for a specific function. v0.1.0 from 2017. Handles destructuring, rest parameters, default values, and extra arguments. Different from simple mapping by using function introspection to respect parameter order. May have limited updates.
npm install object-to-argumentsNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows basic usage: convert object to argument array respecting parameter order, default values, and rest parameters.
Use regular function declaration or ensure function.toString() returns valid signature.
Pass flat object with keys matching parameter names; for nested params, value will be taken as-is and function destructuring will handle it.
Extra values are added after all named and destructured parameters; they become part of the function's arguments object or rest parameter.
Consider alternatives like manual argument mapping or Proxy-based solutions for maintenance.
Ensure first argument is a function: objectToArguments(myFunc, obj).
Ensure all values are primitives or simple objects as needed by the function signature.
No dependency data recorded yet.