flex-flow.js 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. (function() {
  2. var Declaration, FlexFlow, flexSpec,
  3. extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
  4. hasProp = {}.hasOwnProperty;
  5. flexSpec = require('./flex-spec');
  6. Declaration = require('../declaration');
  7. FlexFlow = (function(superClass) {
  8. extend(FlexFlow, superClass);
  9. function FlexFlow() {
  10. return FlexFlow.__super__.constructor.apply(this, arguments);
  11. }
  12. FlexFlow.names = ['flex-flow'];
  13. FlexFlow.prototype.set = function(decl, prefix) {
  14. var ref, spec;
  15. ref = flexSpec(prefix), spec = ref[0], prefix = ref[1];
  16. if (spec === 2012) {
  17. return FlexFlow.__super__.set.apply(this, arguments);
  18. } else if (spec === 'final') {
  19. return FlexFlow.__super__.set.apply(this, arguments);
  20. }
  21. };
  22. return FlexFlow;
  23. })(Declaration);
  24. module.exports = FlexFlow;
  25. }).call(this);