Socket
Socket
Sign inDemoInstall

backbone.namedconstructor

Package Overview
Dependencies
2
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    backbone.namedconstructor

Names Backbone object constructors.


Version published
Weekly downloads
1
Maintainers
1
Created
Weekly downloads
 

Changelog

Source

v1.0.1 / 2015-03-19

  • (32fb202) Tweak README example

Readme

Source

backbone.namedconstructor

Build Status NPM version

Give your Backbone object a named constructor, so you can make sense of it in the dev tools console.

So, instead of:

You'll see:

Installation

$ npm install backbone.namedconstructor

Example

var Backbone = require('backbone');
require('backbone.namedconstructor');

var Model = Backbone.Model.extend({ constructorName: 'Foo' });
console.log(new Model().constructor.name);
// 'Foo'

Tests

$ npm test

Credit

The basis for this module was this great Stack Overflow answer given by Dan Malcolm. Cheers!

Keywords

FAQs

Last updated on 18 Mar 2015

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc