@putout/operate
Advanced tools
'use strict'; | ||
const {isObjectExpression} = require('@putout/babel').types; | ||
const {extract} = require('../extract'); | ||
@@ -30,2 +31,5 @@ const {traverseProperties} = require('./traverse-properties'); | ||
module.exports.getProperty = (path, name) => { | ||
if (!isObjectExpression(path)) | ||
throw Error(`☝️Looks like path is not 'ObjectExpression', but: '${path.type}' for path: ${path}`); | ||
const propertyPaths = path.get(`properties`); | ||
@@ -32,0 +36,0 @@ |
{ | ||
"name": "@putout/operate", | ||
"version": "12.11.0", | ||
"version": "12.12.0", | ||
"type": "commonjs", | ||
@@ -14,3 +14,3 @@ "author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)", | ||
"type": "git", | ||
"url": "git://github.com/coderaiser/putout.git" | ||
"url": "git+https://github.com/coderaiser/putout.git" | ||
}, | ||
@@ -17,0 +17,0 @@ "scripts": { |
27218
0.81%613
0.49%