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

map-factory

Package Overview
Dependencies
Maintainers
3
Versions
56
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

map-factory - npm Package Versions

13
6

3.7.3

Diff

Changelog

Source

3.7.3

npm audit fixes.

midknight41
published 3.7.2 •

Changelog

Source

3.7.2

fixed a bug with pipeline transformations.

midknight41
published 3.7.1 •

Changelog

Source

3.7.1

Fixed a bug when traversing an array of a non-existing object.

midknight41
published 3.7.0 •

Changelog

Source

3.7.0

The notFound transform function for the to() method will now supply the the type of non-value they discovered (null or undefined).

Fixed a bug where the set method could not be used after the map method.

midknight41
published 3.6.1 •

Changelog

Source

3.6.1

Fixed a bug with the keep method.

const source = {
  "foo": {
      "foo1": "bar",
       "bar": "bar"
  }
}
mapper.map("foo").keep(["foo1", "foo2"]);

// foo2 should not exist here

 {
  "foo": {
      "foo1": "bar",
       "foo2": undefined
  }
}
midknight41
published 3.6.0 •

Changelog

Source

3.6.0

The to() method now takes a optional notFound transform that allows for basic conditional logic to be applied. For convenience, you can also supply a basic value.


const mapper = createMapper();

// These two mappings are logically equivalent
mapper
  .map("amount").to("data", amount => `£${amount}`, () => "£0");
  .map("amount").to("data", amount => `£${amount}`, "£0");

midknight41
published 3.5.0 •

Changelog

Source

3.5.0

The source field for the map() method is now optional. If omitted, the method will get the entire source object. This is quite useful when combined with pipeline transformations.

const mapper = createMapper();

mapper
  .map().to("data");
  .execute({"a": "b"})

/*
  {
    data: {"a": "b"}
  }
*/
midknight41
published 3.4.0 •

Changelog

Source

3.4.0

Added the keep() pipeline transformation.

More details can found in the Pipeline Transformations section of the README.

midknight41
published 3.3.0 •

Changelog

Source

3.3.0

Added compact(), first(), and last() Pipeline Transformations for more detailed control over arrays.

More details can found in the Pipeline Transformations section of the README.

midknight41
published 3.2.0 •

Changelog

Source

3.2.0

Mapping can now be conditionally based on other values in the source document using acceptIf() and rejectIf().

More details can found in the Pipeline Transformations section of the README.

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