New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

transform.js

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

transform.js - npm Package Compare versions

Comparing version 1.0.0 to 1.1.0

test/future-functionality-tests.js

2

package.json
{
"name": "transform.js",
"version": "1.0.0",
"version": "1.1.0",
"description": "",

@@ -5,0 +5,0 @@ "main": "transform.transpiled.js",

@@ -11,2 +11,3 @@ # Transform

- [ ] omit nested keys from the objects.
- [ ] transform nested fields

@@ -13,0 +14,0 @@ ## Usage

@@ -109,3 +109,3 @@ 'use strict';

test('Transform should include all fields but ommited even when transformsare given', function (t) {
test('Transform should include all fields but ommited even when transforms are given', function (t) {
var d = [{'x': 1, 'y': 2, 'z': 3}, {'x': 2, 'y': 3, 'z': 4}]

@@ -133,1 +133,13 @@ var result = transform(d, {x: {}}, ['z']);

});
test('Transform should allow transforming nested fields', function (t) {
var d = [{x: {y: 2015}}, {x: {y: 2016}}];
var result = transform(d, {
'x.y': (val) => val + 1
});
var c = _.cloneDeep(d);
c[0].x.y += 1;
c[1].x.y += 1;
t.deepEqual(result, c);
t.end();
});
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