New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

webpack-super

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

webpack-super

a functional approach to writing webpack configs

latest
Source
npmnpm
Version
2.0.0
Version published
Maintainers
1
Created
Source

webpack-super

Build Status npm Coverage Status Donate Bitcoin

a functional approach to writing webpack configs

Installation

npm install webpack-super --save

Functions

appendAt(path, value, obj) ⇒ object

Creates a new object with the value set at the path provided and copy the rest.

Kind: global function
Implements: Transformer

ParamTypeDescription
pathstringpath string where the value needs to be set
valueanythe value that needs to be set
objobjectthe object that needs to be transformed

compose(...funcs) ⇒ function

Creates a composition factory functions

Kind: global function
Implements: Helper

ParamTypeDescription
...funcsfunctionfactory functions

copy(path, source, destination) ⇒ object

Copies a value at a path from source to destination

Kind: global function
Implements: Transformer

ParamTypeDescription
pathstringpath string where the value needs to be picked/set
sourceobjectsource object from where the value needs to be picked
destinationobjectdestination object where the value needs to be set

Example

copy('a.b', {a: {b: 100}}, {p: 100}) // outputs: {a: {b: 100}, q: 100}

setAt(path, value, obj) ⇒ object

Creates a new object with the value set at the path provided and copy the rest.

Kind: global function
Implements: Transformer
Returns: object - the new object with the value

ParamTypeDescription
pathstringpath string where the value needs to be set
valueanythe value that needs to be set
objobjectthe object that needs to be transformed

Example

setAt('entry', './src/main.js', {}) // outputs: {entry: './src/main.js'}
setAt('output.filename', '[hash].bundle.js', {}) // outputs: {output: {filename: '[hash].bundle.js'}}

when(condition, func) ⇒ function

Returns a new function that is either has no effect (identity) or or has the same as the passed func based on the condition.

Kind: global function
Implements: Transformer

ParamTypeDescription
conditionbooleanthe condition
funcfunctionthe function to be called

Keywords

webpack

FAQs

Package last updated on 20 Aug 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts