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

evangelist

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

evangelist

Library for overriding or wrapping functions

  • 0.0.4
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

evangelist

npm version npm download dependencies license

What is the Evangelist?

Evangelist is a JavaScript library which allows you to override or wrap any function with another one.

Example Usage

import evangelist from 'evangelist';

// wrap - calculator sample
let fnc = () => 5;
fnc = evangelist.wrap(fnc, (next) => next() * 2);
fnc = evangelist.wrap(fnc, (next) => next() + 1);

console.log(`fnc: ${fnc()}`); // outputs: 'fnc: 11'

// pipe - combine sample
const lower = x => x.toLowerCase();
const chars = x => x.replace(/[^\w \-]+/g, '');
const spaces = x => x.split(' ');
const dashes = x => x.join('-');

const slug = evangelist.pipe(lower, chars, spaces, dashes);

const message = slug('Hello World!');

console.log(`slug: ${message}`); // outputs 'slug: hello-world'

Quick start

Execute npm install evangelist --save to install evangelist and its dependencies into your project directory.

Todo List

See GitHub Projects for more.

Requirements

License

Apache 2.0, for further details, please see LICENSE file

Contributing

See contributors.md

It is publicly open for any contribution. Bugfixes, new features and extra modules are welcome.

  • To contribute to code: Fork the repo, push your changes to your fork, and submit a pull request.
  • To report a bug: If something does not work, please report it using GitHub Issues.

To Support

Visit my patreon profile at patreon.com/eserozvataf

Keywords

FAQs

Package last updated on 19 Apr 2017

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