Détail du package

super

vesln3.1k0.2.3

Extend everything.

extend, inherits, super, clone

readme

Build Status

super - Extend everything.

http://github.com/vesln/super

Description

super is super simple library that will be your best friend, when it comes to inheritance/extending. Nothing fancy, just something that I use a lot.

Synopsis

JavaScript:


var extend = require('super');

// Classes, actually it uses util.inherits.

var EventEmitter = require('events').EventEmitter;
function Foo() {};

extend(Foo, EventEmitter);
var foo = new Foo;

console.log(foo instanceof EventEmitter);
console.log(Foo.super_ == EventEmitter);

// Objects

var foo = { bar: 'baz' };
var bar = { foo: 3 };
var baz = extend(bar, foo);

console.log(baz);

Requirements

Install

$ npm install super

Tests

$ make test

License

MIT License

Copyright (C) 2012 Veselin Todorov

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

changelog

0.2.3 / 2013-12-13

  • Add support for older browsers

0.2.2 / 2013-12-08

  • Component support

0.2.1 / 2012-06-15

  • browser build
  • browser version attaches as inherits
  • expose all functions
  • 0.2.0
  • Merge pull request #2 from logicalparadox/feature/self-extension
  • update readme to accurately represent new features
  • add test for self extension helper
  • add backbone style self extension helper
  • Merge pull request #1 from logicalparadox/master
  • Merge branch 'feature/browser'
  • browser build
  • add browser tests
  • add browser build script
  • version is static
  • added folio dependancy
  • replace node util dep
  • Merge branch 'refactor/chai'
  • chai coding standards
  • convert tests to use chai
  • Adding clone example.
  • 0.1.0
  • The module can be used as clone now. var clone = require('super'); var objClone = clone({foo: 'bar'});
  • 0.0.2
  • Removing package from deps.
  • Reverting... I am an idiot
  • Return instead of continue

0.2.0 / 2012-06-15

  • Merge pull request #2 from logicalparadox/feature/self-extension
  • update readme to accurately represent new features
  • add test for self extension helper
  • add backbone style self extension helper
  • Merge pull request #1 from logicalparadox/master
  • Merge branch 'feature/browser'
  • browser build
  • add browser tests
  • add browser build script
  • version is static
  • added folio dependancy
  • replace node util dep
  • Merge branch 'refactor/chai'
  • chai coding standards
  • convert tests to use chai

0.1.0 / 2012-01-29

  • The module can be used as clone now.

0.0.2 / 2012-01-27

  • Removing package from deps.

0.0.1 / 2012-01-04

  • Initial version.