Comparing version 0.1.0 to 1.0.0
'use strict'; | ||
var partOf = function (subset, superset) { | ||
const partOf = function (subset, superset) { | ||
if (typeof subset !== 'object') { | ||
@@ -10,9 +10,9 @@ return false; | ||
} | ||
if (!!subset && !superset) { | ||
if (Boolean(subset) && !superset) { | ||
return false; | ||
} | ||
return Object.keys(subset).every(function (key) { | ||
var subsetValue = subset[key], | ||
supersetValue = superset[key]; | ||
return Object.keys(subset).every(key => { | ||
const subsetValue = subset[key], | ||
supersetValue = superset[key]; | ||
@@ -19,0 +19,0 @@ if (typeof supersetValue === 'object' && supersetValue !== null && subsetValue !== null) { |
{ | ||
"name": "partof", | ||
"version": "0.1.0", | ||
"version": "1.0.0", | ||
"description": "partof verifies whether one object is part of an other.", | ||
@@ -15,8 +15,8 @@ "contributors": [ | ||
], | ||
"main": "lib/partOf.js", | ||
"main": "dist/partOf.js", | ||
"dependencies": {}, | ||
"devDependencies": { | ||
"assertthat": "0.6.0", | ||
"grunt": "0.4.5", | ||
"tourism": "0.20.2" | ||
"assertthat": "1.0.0", | ||
"roboter": "0.15.6", | ||
"roboter-server": "0.15.6" | ||
}, | ||
@@ -23,0 +23,0 @@ "repository": { |
@@ -7,3 +7,5 @@ # partof | ||
$ npm install partof | ||
```shell | ||
$ npm install partof | ||
``` | ||
@@ -15,3 +17,3 @@ ## Quick start | ||
```javascript | ||
var partOf = require('partof'); | ||
const partOf = require('partof'); | ||
``` | ||
@@ -22,4 +24,4 @@ | ||
```javascript | ||
var potentialSubset = { foo: 'bar' }, | ||
superset = { foo: 'bar', bas: 'baz' }; | ||
const potentialSubset = { foo: 'bar' }, | ||
superset = { foo: 'bar', bas: 'baz' }; | ||
@@ -32,5 +34,7 @@ console.log(partOf(potentialSubset, superset)); | ||
This module can be built using [Grunt](http://gruntjs.com/). Besides running the tests, this also analyses the code. To run Grunt, go to the folder where you have installed partof and run `grunt`. You need to have [grunt-cli](https://github.com/gruntjs/grunt-cli) installed. | ||
To build this module use [roboter](https://www.npmjs.com/package/roboter). | ||
$ grunt | ||
```shell | ||
$ bot | ||
``` | ||
@@ -40,3 +44,3 @@ ## License | ||
The MIT License (MIT) | ||
Copyright (c) 2015 the native web. | ||
Copyright (c) 2015-2018 the native web. | ||
@@ -43,0 +47,0 @@ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
7669
141
1
47
2