Better primitives for prototype-based OO.
Last updated 5 years ago by robotlolita .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install refinable 
SYNC missed versions from official npm registry.


Chat on GitterBuild statusNPM versionDependencies statusLicenceStability: Stable

A better primitive for prototype-based OO.


const Refinable = require('refinable');

const Point2d = Refinable.refine({
  x: 0,
  y: 0,
  toString() {
    return this.x + ', ' + this.y

const p1 = Point2d.refine({ x: 10, y: 10 });
const p2 = p1.refine({ y: 20 });

// => 10, 10
// => 10, 20


The officially supported way of getting Refinable is through npm:

$ npm install refinable


If you don't have npm, you'll need to install Node.js in your system before installing Refinable.

A tool like Browserify or Webpack can be used to run Refinable in platforms that don't implement Node-style modules, like the Browser.

Supported platforms

Refinable is supported in all platforms that support ECMAScript 5.

For platforms that don't support ECMAScript 5, (like IE8 and 9) the es5-shim library can be used to provide the additional runtime support.


If you think you've found a bug in the project, or want to voice your frustration about using it (maybe the documentation isn't clear enough? Maybe it takes too much effort to use?), feel free to open a new issue in the Github issue tracker.

Pull Requests are welcome. By submitting a Pull Request you agree with releasing your code under the MIT licence.

You can join the Gitter Channel for quick support. You may also contact the author directly through email, or Twitter.

Note that all interactions in this project are subject to Origami Tower's Code of Conduct.


Refinable is copyright (c) Quildreen Motta 2016, and released under the MIT licence. See the LICENCE file in this repository for detailed information.

Current Tags

  • 1.0.2                                ...           latest (5 years ago)

3 Versions

  • 1.0.2                                ...           5 years ago
  • 1.0.1                                ...           5 years ago
  • 1.0.0                                ...           5 years ago
Maintainers (1)
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)

Copyright 2014 - 2016 © |