Socket
Socket
Sign inDemoInstall

ampersand-jid-datatype-mixin

Package Overview
Dependencies
18
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    ampersand-jid-datatype-mixin

JID datatype for Ampersand state


Version published
Maintainers
1
Install size
28.3 kB
Created

Readme

Source

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

FAQs

Last updated on 19 Aug 2014

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc