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

@salesflare/optimus

Package Overview
Dependencies
Maintainers
5
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@salesflare/optimus

Transformer for Salesflare filter rules

  • 7.2.7
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
29
decreased by-59.72%
Maintainers
5
Weekly downloads
 
Created
Source

Optimus

Greenkeeper badge

Transformer for Salesflare filter rules.

Available as a plain transform function, hapi 19 helper functions or client transformer.

The client build supports last 2 versions according to browserslist, see https://browserl.ist/?q=last+2+versions. The client build is transformed through Babel but does not come with polyfills, for that we recommend https://polyfill.io. This means we can use object spread in our transformer, which will be transformed, but something like Set you will have to polyfill yourself.

const Optimus = require('@salesflare/optimus');
const Hapi = require('@hapi/hapi');

const server = new Hapi.Server();

const transformedFilter = Optimus.transform(oldFilter); // plain

// in a route config
{
    ...,
    // this changes the rules in request.payload to the transformed rules
    pre: [Optimus.pre.transformInPlace('payload')],
    ...
}
<script src="./node_modules/@salesflare/optimus/dist/optimus.min.js"></script>
<script>
    var transformedFilter = Optimus.transform(oldFilter);
</script>

Keywords

FAQs

Package last updated on 02 Aug 2023

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

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