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

@stamp/shortcut

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@stamp/shortcut

Adds handy shortcuts for stamp composition

  • 0.1.3
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.2K
decreased by-24.14%
Maintainers
1
Weekly downloads
 
Created
Source

@stamp/shortcut

Adds few handy static methods for simpler composition

By composing the @stamp/shortcut into your stamp

MyStamp = MyStamp.compose(Shortcut);

you get few static methods. So, instead of typing

MyStamp.compose({ deepProperties: bla });

you will be able to write

MyStamp.deepProps(bla);

Usage

import Shortcut from '@stamp/shortcut';

const MyStamp = Shortcut
  .methods({ myMethod() {} })
  .props({ foo: 'foo' })
  .deepProps({ deepFoo: { foo: 'foo 2' } })
  .statics({ bar: 'bar' })
  .deepStatics({ deepBar: { bar: 'bar 2' } })
  .conf({ something: 'something' })
  .deepConf({ deepSomething: { something: 'something' } })
  .init((arg, {stamp, args, instance}) => { /* initializer */ })
  .composers(({stamp, composables}) => { /* composer */ });

API

Static methods

methods

stamp.methods(Object) -> Stamp

props

stamp.props(Object) -> Stamp

deepProps

stamp.deepProps(Object) -> Stamp

statics

stamp.statics(Object) -> Stamp

deepStatics

stamp.deepStatics(Object) -> Stamp

conf

stamp.conf(Object) -> Stamp

deepConf

stamp.deepConf(Object) -> Stamp

init

stamp.init(...Function) -> Stamp

composers

stamp.composers(...Function) -> Stamp

FAQs

Package last updated on 14 Feb 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