🐊 Pluggable and configurable JavaScript Linter, code transformer and formatter, drop-in ESLint superpower replacement 💪 with built-in support for js, jsx, typescript, flow, markdown, yaml and json. Write declarative codemods in a simplest possible way 😏
Installations
npm install @putout/plugin-extract-object-properties
Developer Guide
Typescript
No
Module System
CommonJS
Min. Node Version
>=16
Node Version
18.14.2
NPM Version
9.1.3
Score
62.2
Supply Chain
77.3
Quality
71.4
Maintenance
100
Vulnerability
97.9
License
Releases
Contributors
Languages
JavaScript (99.09%)
TypeScript (0.65%)
HTML (0.17%)
WebAssembly (0.05%)
CSS (0.02%)
Svelte (0.01%)
Developer
Download Statistics
Total Downloads
1,761,696
Last Day
2,378
Last Week
10,253
Last Month
45,660
Last Year
667,949
GitHub Statistics
722 Stars
14,734 Commits
41 Forks
10 Watching
46 Branches
24 Contributors
Bundle Size
1.99 kB
Minified
932.00 B
Minified + Gzipped
Package Meta Information
Latest Version
9.0.0
Package Id
@putout/plugin-extract-object-properties@9.0.0
Unpacked Size
7.87 kB
Size
2.95 kB
File Count
6
NPM Version
9.1.3
Node Version
18.14.2
Publised On
01 Apr 2023
Total Downloads
Cumulative downloads
Total Downloads
1,761,696
Last day
-3.4%
2,378
Compared to previous day
Last week
-5.3%
10,253
Compared to previous week
Last month
-1.9%
45,660
Compared to previous month
Last year
70.2%
667,949
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
@putout/plugin-extract-object-properties ![NPM version](https://img.shields.io/npm/v/@putout/plugin-extract-object-properties.svg?style=flat&longCache=true)
The destructuring assignment makes possible to unpack values from objects into distinct variables.
(c) MDN
🐊Putout plugin adds ability to apply destructuring to extract object properties.
Install
npm i @putout/plugin-extract-object-properties -D
Rule
1{ 2 "rules": { 3 "extract-object-properties/equal-deep": "on", 4 "extract-object-properties/not-equal-deep": "on" 5 } 6}
Equal Deep
❌ Example of incorrect code
1const {replaceWith} = a.operate; 2const {isIdentifier} = a.types;
✅ Example of correct code
1const { 2 operator, 3 types, 4} = a; 5 6const {replaceWith} = operator; 7const {isIdentifier} = types;
Not Equal Deep
❌ Example of incorrect code
1const {replaceWith} = a; 2const {isIdentifier} = a.types;
✅ Example of correct code
1const {replaceWith, types} = a; 2const {isIdentifier} = types;
License
MIT
![Empty State](/_next/static/media/empty.e5fae2e5.png)
No vulnerabilities found.
Reason
30 commit(s) and 4 issue activity found in the last 90 days -- score normalized to 10
Reason
no dangerous workflow patterns detected
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: MIT License: LICENSE:0
Reason
0 existing vulnerabilities detected
Reason
no binaries found in the repo
Reason
Found 0/30 approved changesets -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
detected GitHub workflow tokens with excessive permissions
Details
- Warn: no topLevel permission defined: .github/workflows/nodejs-pr.yml:1
- Warn: no topLevel permission defined: .github/workflows/nodejs.yml:1
- Info: no jobLevel write permissions found
Reason
no SAST tool detected
Details
- Warn: no pull requests merged into dev branch
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/nodejs-pr.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/coderaiser/putout/nodejs-pr.yml/master?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/nodejs-pr.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/coderaiser/putout/nodejs-pr.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/nodejs-pr.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/coderaiser/putout/nodejs-pr.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/nodejs-pr.yml:33: update your workflow using https://app.stepsecurity.io/secureworkflow/coderaiser/putout/nodejs-pr.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/nodejs.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/coderaiser/putout/nodejs.yml/master?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/nodejs.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/coderaiser/putout/nodejs.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/nodejs.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/coderaiser/putout/nodejs.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/nodejs.yml:34: update your workflow using https://app.stepsecurity.io/secureworkflow/coderaiser/putout/nodejs.yml/master?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/nodejs.yml:49: update your workflow using https://app.stepsecurity.io/secureworkflow/coderaiser/putout/nodejs.yml/master?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/nodejs.yml:58: update your workflow using https://app.stepsecurity.io/secureworkflow/coderaiser/putout/nodejs.yml/master?enable=pin
- Info: 0 out of 6 GitHub-owned GitHubAction dependencies pinned
- Info: 0 out of 4 third-party GitHubAction dependencies pinned
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Score
4.8
/10
Last Scanned on 2025-01-27
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More