New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

complete-assign

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

complete-assign - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

2

package.json
{
"name": "complete-assign",
"version": "0.0.1",
"version": "0.0.2",
"description": "completeAssign",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -1,20 +0,1 @@

# astroboy-plugin-boilerplate
Boilerplate for astroboy plugin
[![NPM version][npm-image]][npm-url]
[![build status][travis-image]][travis-url]
[![David deps][david-image]][david-url]
[![NPM download][download-image]][download-url]
[![Gitter][gitter-image]][gitter-url]
[npm-image]: https://img.shields.io/npm/v/astroboy-boilerplate-plugin.svg?style=flat-square
[npm-url]: https://npmjs.org/package/astroboy-boilerplate-plugin
[travis-image]: https://img.shields.io/travis/astroboy-lab/astroboy-boilerplate-plugin.svg?style=flat-square
[travis-url]: https://travis-ci.org/astroboy-lab/astroboy-boilerplate-plugin
[david-image]: https://img.shields.io/david/astroboy-lab/astroboy-boilerplate-plugin.svg?style=flat-square
[david-url]: https://david-dm.org/astroboy-lab/astroboy-boilerplate-plugin
[download-image]: https://img.shields.io/npm/dm/astroboy-boilerplate-plugin.svg?style=flat-square
[download-url]: https://npmjs.org/package/astroboy-boilerplate-plugin
[gitter-image]: https://img.shields.io/gitter/room/astroboy-lab/astroboy-boilerplate-plugin.svg?style=flat-square
[gitter-url]: https://gitter.im/astroboy-lab/astroboy-boilerplate-plugin
# complete-assign

@@ -23,9 +23,37 @@ import test from 'ava';

test('completeAssign: function', t => {
let target = {};
completeAssign(target, {
foo() {
return 'bar';
}
});
t.is(target.foo(), 'bar');
let target = {};
completeAssign(target, {
foo() {
return 'bar';
}
});
t.is(target.foo(), 'bar');
});
test('completeAssign: class and plain object', t => {
class Foo {}
completeAssign(Foo.prototype, {
foo: 'bar'
});
t.is(new Foo().foo, 'bar');
});
test('completeAssign: class & getter', t => {
class Foo {}
completeAssign(Foo.prototype, {
get foo() {
return 'bar';
}
});
t.is(new Foo().foo, 'bar');
});
test('completeAssign: class & function', t => {
class Foo {}
completeAssign(Foo.prototype, {
foo() {
return 'bar';
}
});
t.is(new Foo().foo(), 'bar');
});
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