Socket
Socket
Sign inDemoInstall

newify

Package Overview
Dependencies
0
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.1.0 to 1.1.1

3

package.json
{
"name": "newify",
"version": "1.1.0",
"version": "1.1.1",
"description": "Call function constructors with an array of arguments",

@@ -18,2 +18,3 @@ "main": "index.js",

"object",
"spread",
"instantiate"

@@ -20,0 +21,0 @@ ],

# Purpose
Calling function constructors with an array of arguments is difficult.
Calling function constructors with an array of arguments is difficult. Until [spread](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Spread_operator) params come to js.

@@ -18,5 +18,11 @@ For a given function constructor

var arr = ['john','scot', 1980]
var s = new Student(arr) //but this will obviously not work
var s = new Student(arr) //but this will obviously not work as expected.
//we need ES6 spread
var s = new Student(...arr)
```
But since spread is not in ES5 yet...
NEWIFY to the rescue!

@@ -23,0 +29,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc