Big update!Introducing GitHub Bot Commands. Learn more
Socket
Log inBook a demo

simple-swizzle

Package Overview
Dependencies
1
Maintainers
1
Versions
4
Issues
File Explorer

Advanced tools

simple-swizzle

Simply swizzle your arguments

    0.2.2latest

Version published
Maintainers
1
Weekly downloads
12,942,450
decreased by-1.7%

Weekly downloads

Readme

Source

simple-swizzle Travis-CI.org Build Status Coveralls.io Coverage Rating

Swizzle your function arguments; pass in mixed arrays/values and get a clean array

Usage

var swizzle = require('simple-swizzle'); function myFunc() { var args = swizzle(arguments); // ... return args; } myFunc(1, [2, 3], 4); // [1, 2, 3, 4] myFunc(1, 2, 3, 4); // [1, 2, 3, 4] myFunc([1, 2, 3, 4]); // [1, 2, 3, 4]

Functions can also be wrapped to automatically swizzle arguments and be passed the resulting array.

var swizzle = require('simple-swizzle'); var swizzledFn = swizzle.wrap(function (args) { // ... return args; }); swizzledFn(1, [2, 3], 4); // [1, 2, 3, 4] swizzledFn(1, 2, 3, 4); // [1, 2, 3, 4] swizzledFn([1, 2, 3, 4]); // [1, 2, 3, 4]

License

Licensed under the MIT License. You can find a copy of it in LICENSE.

Keywords

FAQs

What is simple-swizzle?

Simply swizzle your arguments

Is simple-swizzle popular?

The npm package simple-swizzle receives a total of 11,224,229 weekly downloads. As such, simple-swizzle popularity was classified as popular.

Is simple-swizzle well maintained?

We found that simple-swizzle demonstrated a not healthy version release cadence and project activity because the last version was released a year ago.It has 1 open source maintainer collaborating on the project.

Last updated on 16 Nov 2016

Did you know?

Socket installs a Github app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the dependencies.

Install Socket
Socket

Product

Subscribe to our newsletter

Get open source security insights delivered straight into your inbox. Be the first to learn about new features and product updates.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc