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

deprecated-obj

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

deprecated-obj - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

4

index.js

@@ -1,2 +0,2 @@

const { isPlainObject, forOwn, set, size } = require('lodash');
const { forOwn, has, isPlainObject, set, size } = require('lodash');
const flat = require('flat');

@@ -36,3 +36,3 @@

});
} else {
} else if(!has(compliant, keys)) {
set(compliant, keys, {});

@@ -39,0 +39,0 @@ }

{
"name": "deprecated-obj",
"version": "1.0.0",
"version": "1.0.1",
"description": "Compares deprecations against a configuration object, and returns a compliant object and violations",

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

@@ -7,3 +7,3 @@ # deprecated-obj

```
```js
const Deprecation = require('deprecation');

@@ -26,9 +26,5 @@

// or
// Or flat:
const deprecations = { 'old.deprecated': 'new.shiny', 'remove.me': null };
const deprecations = {
"old.deprecated": "new.shiny",
"remove.me": null
}
const deprecation = new Deprecation(deprecations, myConfig);

@@ -41,5 +37,5 @@ ```

```
```js
const myCompliant = deprecation.getCompliant();
→ { "fine": true, "new": { "shiny": true } }
→ { fine: true, new: { shiny: true } }
```

@@ -51,5 +47,5 @@

```
```js
const violations = deprecation.getViolations();
→ { "old.deprecated": "new.shiny", "remove.me": null }
→ { 'old.deprecated': 'new.shiny', 'remove.me': null }
```

@@ -59,3 +55,3 @@

```
```js
if (Object.keys(violations).length > 0) {

@@ -68,1 +64,5 @@ console.warn(`Deprecated configuration options found. Please migrate before the next major release.`);

```
## Example
See [github.com/release-it/.../deprecated.js](https://github.com/webpro/release-it/blob/master/lib/deprecated.js) for a real-world example.
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