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

unpartial

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

unpartial - npm Package Compare versions

Comparing version 0.3.1 to 0.4.0

4

dist-es2015/unpartial.js

@@ -20,3 +20,5 @@ "use strict";

function unpartialDuo(base, partial) {
if (partial === undefined || partial === null)
if (partial === undefined)
return base;
if (base === null || base === undefined)
return partial;

@@ -23,0 +25,0 @@ return Object.assign({}, base, partial);

@@ -28,3 +28,5 @@ "use strict";

function unpartialDuo(base, partial) {
if (partial === undefined || partial === null)
if (partial === undefined)
return base;
if (base === null || base === undefined)
return partial;

@@ -31,0 +33,0 @@ return __assign({}, base, partial);

{
"name": "unpartial",
"version": "0.3.1",
"version": "0.4.0",
"description": "Unpartial a partialed object",

@@ -17,14 +17,14 @@ "main": "dist-es5/index.js",

"clean": "rimraf dist-es5 dist-es2015",
"coverage": "nyc npm test",
"coveralls": "nyc report --reporter=text-lcov | coveralls",
"dc": "npm run dependency-check",
"debug": "node scripts/debug.js",
"dependency-check": "dependency-check . --unused --no-dev && dependency-check . --missing --no-dev",
"lint": "tslint -p tsconfig.json --type-check \"src/**/*.ts\"",
"prepare": "npm run build",
"lint": "tslint -p tsconfig.json 'src/**/*.ts'",
"postpublish": "git push",
"prepublish": "npm run build",
"preversion": "git pull && npm run verify",
"verify": "npm run lint && npm run coverage && npm run dependency-check",
"coverage": "nyc npm test",
"coveralls": "nyc report --reporter=text-lcov | coveralls",
"test": "npm run clean && tsc && ava",
"watch": "npm run clean && node scripts/watch.js",
"debug": "node scripts/debug.js"
"watch": "npm run clean && node scripts/watch.js"
},

@@ -73,10 +73,10 @@ "repository": {

"@types/lodash.merge": "^4.6.3",
"ava": "^0.22.0",
"ava": "^0.23.0",
"dependency-check": "^2.9.1",
"nyc": "^11.2.1",
"nyc": "^11.3.0",
"rimraf": "^2.6.2",
"tslint": "^5.7.0",
"tslint": "^5.8.0",
"tslint-config-unional": "^0.8.0",
"typescript": "^2.5.3"
"typescript": "^2.6.1"
}
}

@@ -10,3 +10,3 @@ # Unpartial

Unpartial an interface
Unpartial an interface.

@@ -25,3 +25,3 @@ It is very common to define a config interface and `Partial<>` it in a function argument.

function foo(givenConfig: Partial<Config>) {
function foo(givenConfig?: Partial<Config>) {
const config = unpartial(defaultConfig, givenConfig);

@@ -50,3 +50,3 @@ // use config with type safety

function foo(givenOption: Partial<MyOption>) {
function foo(givenOption?: Partial<MyOption>) {
const option = unpartial(defaultOption, myDefaultOption, givenOption)

@@ -73,5 +73,5 @@ }

[downloads-url]: https://npmjs.org/package/unpartial
[travis-image]: https://img.shields.io/travis/unional/unpartial.svg?style=flat
[travis-url]: https://travis-ci.org/unional/unpartial
[travis-image]: https://img.shields.io/travis/unional/unpartial/master.svg?style=flat
[travis-url]: https://travis-ci.org/unional/unpartial?branch=master
[coveralls-image]: https://coveralls.io/repos/github/unional/unpartial/badge.svg
[coveralls-url]: https://coveralls.io/github/unional/unpartial

Sorry, the diff of this file is not supported yet

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