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

haybale

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

haybale

decorate a model prototype with the methods of a db adapter

  • 1.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

haybale

decorate an object prototype with the methods of an object

use

var decorate = require("haybale");


// model prototype
var model = {

  name: "hello"

}

// object with methods
var obj = {
  run: function () {
    console.log("running");
  },
  end: function () {
    console.log("ending");
  }
};


decorate(model, obj);

model.run();

model.end();

api

haybale exposes a single function

decorate(fn, obj)

params

model: the object prototype to be decorated

obj: the object with which to decorate the model

Keywords

FAQs

Package last updated on 29 Apr 2015

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