Security News
Highlights from the 2024 Rails Community Survey
A record 2,709 developers participated in the 2024 Ruby on Rails Community Survey, revealing key tools, practices, and trends shaping the Rails ecosystem.
Creates a real Array from almost anything.
$ npm install make-array --save
var makeArray = require('make-array');
makeArray(); // []
makeArray(undefined); // []
makeArray(1); // [1]
makeArray([1, 2]); // [1, 2]
makeArray({
'0': 1,
'1': 2,
length: 2
}); // [1, 2]
function foo (){
return makeArray(arguments);
}
foo(1, 2, 3); // [1, 2, 3]
mixed
things you want to make it an arrayArray=
if host
is specified, the newly-created array will append to the end of the host
Returns Array
. If host
is specified, it will return the host
itself.
var host = [1, 2];
function foo(){
return arguments;
}
var result = makeArray(foo({}, []), host);
result; // [1, 2, {}, []];
result === host; // true
MIT
FAQs
Creates a real Array from almost anything.
We found that make-array 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.
Did you know?
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.
Security News
A record 2,709 developers participated in the 2024 Ruby on Rails Community Survey, revealing key tools, practices, and trends shaping the Rails ecosystem.
Security News
In 2023, data breaches surged 78% from zero-day and supply chain attacks, but developers are still buried under alerts that are unable to prevent these threats.
Security News
Solo open source maintainers face burnout and security challenges, with 60% unpaid and 60% considering quitting.