Nanometers Per Millisecond

    ampersand-jid-datatype-mixin

    1.0.0 • Public • Published

    ampersand-jid-datatype-mixin

    A mixin for supporting XMPP JIDs as a state datatype.

    Install

    $ npm install ampersand-jid-datatype-mixin

    Example

    var State = require('ampersand-state');
    var JIDMixin = require('ampersand-jid-datatype-mixin');
     
    var StateWithJID = State.extend(JIDMixin, {
        props: {
            to: 'jid',
            from: 'jid'
        }
    });
     
    var ex = new StateWithJID();
    ex.to = 'foo@example.com/bar';
     
    console.log(ex.to.bare);
    // -> 'foo@example.com'
    console.log(ex.to.resource);
    // -> 'bar'

    License

    MIT

    Keywords

    none

    Install

    npm i ampersand-jid-datatype-mixin

    DownloadsWeekly Downloads

    1

    Version

    1.0.0

    License

    MIT

    Last publish

    Collaborators

    • lancestout