
Company News
Socket Joins New OpenJS Program to Fund Node.js Security Work
Socket is joining the OpenJS Security Stewardship Program to fund Node.js vulnerability research, maintainer remediation, and security releases.
@patarapolw/deepfind
Advanced tools
Deep find a primitive or a plain Object inside an Array or a plain Object. Always return a Object (an Array or a plain Object), so that the Object (an Array or a plain Object) can be tweaked.
Deep find a primitive or a plain Object inside an Array or a plain Object. Always return a Object (an Array or a plain Object), so that the Object (an Array or a plain Object) can be tweaked.
I wrote this package specifically to search for a Webpack config inside nuxt.config.js and vue.config.js, so that I can tweak pug-plain-loader or raw-loader.
import deepfind from '@patarapolw/deepfind'
console.log(deepfind(config, { loader: 'pug-plain-loader' }))
console.log(deepfind(config, 'raw-loader'))
Output
[
{
loader: 'pug-plain-loader',
options: {}
},
{
loader: 'pug-plain-loader',
options: {}
}
]
[
[
'raw-loader',
{
loader: 'pug-plain-loader',
options: {}
}
]
]
In my nuxt.config.js
import deepfind from '@patarapolw/deepfind'
import showdown from 'showdown'
const mdConverter = new showdown.Converter()
export default {
build: {
/*
** You can extend webpack config here
*/
extend (config, ctx) {
for (const r of deepfind(config, 'pug-plain-loader')) {
if (!Array.isArray(r)) {
r.options = r.options || {}
r.options.filters = {
markdown: (s: string) => mdConverter.makeHtml(s)
}
}
}
}
}
}
Apparently, deepfind is already taken. I have to use @patarapolw/deepfind
yarn add @patarapolw/deepfind
# Or npm i @patarapolw/deepfind
FAQs
Deep find a primitive or a plain Object inside an Array or a plain Object. Always return a Object (an Array or a plain Object), so that the Object (an Array or a plain Object) can be tweaked.
We found that @patarapolw/deepfind demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.

Company News
Socket is joining the OpenJS Security Stewardship Program to fund Node.js vulnerability research, maintainer remediation, and security releases.

Security News
Two compromised GitHub Actions were re-enabled with malicious tags intact, exposing thousands of downstream repositories to Mini Shai-Hulud.

Research
/Security News
A malicious Firefox extension fetches its payload after installation to evade detection, steal Google session cookies, and automate account takeover.