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

shades

Package Overview
Dependencies
Maintainers
1
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

shades - npm Package Compare versions

Comparing version 1.12.0 to 1.13.0

reducers.js

11

package.json
{
"name": "shades",
"version": "1.12.0",
"version": "1.13.0",
"description": "Lens-like functionality with a lodash-style interface.",

@@ -12,3 +12,5 @@ "main": "lib/bundle.js",

"test": "BABEL_ENV=test mocha --require babel-core/register",
"inspect": "BABEL_ENV=test mocha --require babel-core/register --inspect"
"inspect": "BABEL_ENV=test mocha --require babel-core/register --inspect",
"typings": "BABEL_ENV=build jscodeshift -t scripts/typings.js src/utils/list/index.js",
"blah": "BABEL_ENV=build node"
},

@@ -40,2 +42,3 @@ "bin": {

"devDependencies": {
"@babel/parser": "^7.0.0-beta.51",
"babel-cli": "^6.26.0",

@@ -45,2 +48,4 @@ "babel-core": "6",

"babel-plugin-lodash": "^3.3.2",
"babel-plugin-transform-flow-strip-types": "^6.22.0",
"babel-plugin-transform-typescript": "^7.0.0-alpha.19",
"babel-preset-env": "^1.6.1",

@@ -50,2 +55,4 @@ "babel-preset-stage-0": "^6.5.0",

"chai": "^4.1.2",
"immutable": "^3.8.2",
"jscodeshift": "^0.5.1",
"lodash": "^4.17.5",

@@ -52,0 +59,0 @@ "mocha": "5.0.4",

62

playground/index.js

@@ -10,23 +10,14 @@ #! /usr/bin/env node

var r = repl.start('shades> ')
r.context.store = {
users: [
r.context.__ = require('lodash')
r.context.jack = {
name: 'Jack Sparrow',
goldMember: false,
posts: [
{
name: 'Jack Sparrow',
goldMember: false,
posts: [
{
title: 'Why is the rum always gone? An analysis of Carribean trade surplus',
likes: 5,
}
]
title: 'Why is the rum always gone? An analysis of Carribean trade surplus',
likes: 5,
},
{
name: 'Elizabeth Swan',
goldMember: true,
posts: [
{
title: 'Bloody Pirates - My Life Aboard the Black Pearl',
likes: 10000,
}
]
title: 'Sea Turtles - The Tortoise and the Hair',
likes: 70,
}

@@ -36,4 +27,39 @@ ]

r.context.liz = {
name: 'Elizabeth Swan',
goldMember: true,
posts: [
{
title: 'Bloody Pirates - My Life Aboard the Black Pearl',
likes: 10000,
},
{
title: 'Guidelines - When YOU need to be disinclined to acquiesce to their request',
likes: 5000,
}
]
}
r.context.bill = {
name: 'Bill Turner',
goldMember: false,
posts: [
{
title: 'Bootstraps Bootstraps - UEFI, GRUB and the Linux Kernel',
likes: 3000,
},
]
}
r.context.store = {
users: [
r.context.jack,
r.context.liz,
r.context.bill
]
}
for (var key in shades) {
r.context[key] = shades[key]
}

@@ -178,3 +178,3 @@ ![shades](imgs/shades.svg)

```js
> const tranformer = mod('users[0].posts[0].likes')(likes => likes + 1)
> const transformer = mod('users[0].posts[0].likes')(likes => likes + 1)
> transformer(store)

@@ -550,6 +550,6 @@ {

> filter((value, key) => isEven(key) && isOdd(value))({2: 1, 3: 1})
{2: 1}
{2: 1
```
#### <a name="updateAll"></a>updateAll :: ...Transformers s => s => s
Consumes a variadic number of transformers (i.e. `Lens`es that have already been applied to a path and a transforming function) and a state function and applies each of them in order to a state object, producing a transformed object
Consumes a variadic number of transformers (i.e. `Lens`es that have already been applied to a path and a transforming function) and applies each of them in order to a state object, producing a transformed object
```js

@@ -564,4 +564,4 @@ > const state = {

> updateAll(
mod('.modal.isOpen')(toggle),
set('.modal.idx')(0),
mod('modal.isOpen')(toggle),
set('modal.idx')(0),
)(state)

@@ -568,0 +568,0 @@

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

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