Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@stdlib/function-ctor

Package Overview
Dependencies
Maintainers
4
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@stdlib/function-ctor - npm Package Compare versions

Comparing version 0.1.1 to 0.2.0

SECURITY.md

7

package.json
{
"name": "@stdlib/function-ctor",
"version": "0.1.1",
"version": "0.2.0",
"description": "Function constructor.",

@@ -41,6 +41,7 @@ "license": "Apache-2.0",

"devDependencies": {
"@stdlib/bench": "^0.1.0",
"tape": "git+https://github.com/kgryte/tape.git#fix/globby",
"istanbul": "^0.4.1",
"tap-min": "git+https://github.com/Planeshifter/tap-min.git"
"tap-min": "git+https://github.com/Planeshifter/tap-min.git",
"@stdlib/bench-harness": "^0.1.2",
"@stdlib/bench": "^0.3.1"
},

@@ -47,0 +48,0 @@ "engines": {

@@ -138,8 +138,15 @@ <!--

<!-- eslint-disable no-invalid-this -->
```javascript
function add( x, y ) {
return x + y;
return this.initial + x + y;
}
var v = add.apply( null, [ 1, 2 ] );
// returns 3
var ctx = {
'initial': 10
};
var v = add.apply( ctx, [ 1, 2 ] );
// returns 13
```

@@ -169,9 +176,15 @@

<!-- eslint-disable no-invalid-this -->
```javascript
function add( x, y ) {
return x + y;
return this.initial + x + y;
}
var v = add.call( null, 1, 2 );
// returns 3
var ctx = {
'initial': 10
};
var v = add.call( ctx, 1, 2 );
// returns 13
```

@@ -275,3 +288,3 @@

Copyright &copy; 2016-2023. The Stdlib [Authors][stdlib-authors].
Copyright &copy; 2016-2024. The Stdlib [Authors][stdlib-authors].

@@ -289,4 +302,4 @@ </section>

[test-image]: https://github.com/stdlib-js/function-ctor/actions/workflows/test.yml/badge.svg?branch=v0.1.1
[test-url]: https://github.com/stdlib-js/function-ctor/actions/workflows/test.yml?query=branch:v0.1.1
[test-image]: https://github.com/stdlib-js/function-ctor/actions/workflows/test.yml/badge.svg?branch=v0.2.0
[test-url]: https://github.com/stdlib-js/function-ctor/actions/workflows/test.yml?query=branch:v0.2.0

@@ -314,4 +327,7 @@ [coverage-image]: https://img.shields.io/codecov/c/github/stdlib-js/function-ctor/main.svg

[deno-url]: https://github.com/stdlib-js/function-ctor/tree/deno
[deno-readme]: https://github.com/stdlib-js/function-ctor/blob/deno/README.md
[umd-url]: https://github.com/stdlib-js/function-ctor/tree/umd
[umd-readme]: https://github.com/stdlib-js/function-ctor/blob/umd/README.md
[esm-url]: https://github.com/stdlib-js/function-ctor/tree/esm
[esm-readme]: https://github.com/stdlib-js/function-ctor/blob/esm/README.md
[branches-url]: https://github.com/stdlib-js/function-ctor/blob/main/branches.md

@@ -318,0 +334,0 @@

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc