canjs / can-map-backup

Backup and restore a Maps state
https://v3.canjs.com/doc/can-map-backup.html
MIT License
2 stars 1 forks source link

Proposal: align the interface with can-define-validate-validatejs.js #48

Closed frank-dspeed closed 6 years ago

frank-dspeed commented 6 years ago

In

you can use

var defineValidate = require('can-define-validate-validatejs');
var User = DefineMap.extend({
    name: {
        validate: {
            presence: true
        }
    }
});
// Attach methods to any instance created of `User`
defineValidate(User);

my proposal is to do the same for can-map-backup or can-define-backup which is even a better name

var defineBackup = require('can-define-backup'); // or can-map-backup
var User = DefineMap.extend({
    name: {
        validate: {
            presence: true
        }
    }
});
// Attach methods to any instance created of `User`
defineBackup(User);
justinbmeyer commented 6 years ago

This would be great

phillipskevin commented 6 years ago

Issue moved to canjs/can-define-backup #8 via ZenHub