New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

array-object-alt

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

array-object-alt

Use an object where an array is required (See examples)

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

Welcome to array-object 👋

Version Documentation Maintenance License: ISC

Use an object where an array is required (See examples)

🏠 Homepage

Install

npm install array-object-alt

Run tests

npm run test

Functions

o2a(o)

Converts an object into an array while preserving keys in 'keys' property

a2o(a)

Converts an array into an object. If the object was converted into array using above method, it will read keys from the keys property

patch([key])

Patches a function so it can be called (always async) with first argument as object instead of an array

call(cb, ...args)

Useful to call the function (sync) with 1st arguments as object instead of array

callAsync(cb, ...args)

Useful to call the function (async) with 1st arguments as object instead of array

o2a(o) ⇒

Converts an object into an array while preserving keys in 'keys' property

Kind: global function
Returns: Array

ParamType
oObject

a2o(a) ⇒

Converts an array into an object. If the object was converted into array using above method, it will read keys from the keys property

Kind: global function
Returns: Object

ParamType
aArray

patch([key])

Patches a function so it can be called (always async) with first argument as object instead of an array

Kind: global function

ParamTypeDefaultDescription
[key]string"$o"The patch name

call(cb, ...args) ⇒

Useful to call the function (sync) with 1st arguments as object instead of array

Kind: global function
Returns: Promise

ParamType
cbCallback
...argsany

callAsync(cb, ...args) ⇒

Useful to call the function (async) with 1st arguments as object instead of array

Kind: global function
Returns: Result

ParamType
cbCallback
...argsany

Author

👤 Praveen Ranjan Keshri

  • Github: @prkeshri
  • LinkedIn: @prkeshri

🤝 Contributing

Contributions, issues and feature requests are welcome!
Feel free to check issues page. You can also take a look at the contributing guide.

Show your support

Give a ⭐️ if this project helped you!

📝 License

Copyright © 2021 Praveen Ranjan Keshri.
This project is ISC licensed.

This README was generated with ❤️ by readme-md-generator

Keywords

array

FAQs

Package last updated on 15 Nov 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts