Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cordova-contact-adapter

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cordova-contact-adapter

An adapter and model for use with cordova contacts plugin

  • 0.0.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

cordova-contact-adapter

An adapter and model for use with cordova contacts plugin

Installation

  • npm install --save-dev cordova-contact-adapter
  • or with the latest ember-cli: ember install:addon cordova-contact-adapter

Using

  • Simply use the cordova-contact model as you'd simply do with any other ember-data model:

    // file: app/routes/contacts.js
    import Ember from 'ember';
    
    export default Ember.Route.extend({
      model: function () {
        return this.store.find('cordova-contact');
      }
    });
    
  • When querying for specific contacts on multiple fields, be sure to use the same filter value for all the query parameters:

    this.store.find('cordova-contact', {name: 'huafu', nickname: 'huafu', displayName: 'huafu'});
    

    Available fields for searching are the same as cordova.contacts.fieldType:

    • addresses
    • birthday
    • categories
    • country
    • department
    • displayName
    • emails
    • familyName
    • formatted
    • givenName
    • honorificPrefix
    • honorificSuffix
    • id
    • ims
    • locality
    • middleName
    • name
    • nickname
    • note
    • organizations
    • phoneNumbers
    • photos
    • postalCode
    • region
    • streetAddress
    • title
    • urls
  • There are 2 special properties on each model as well as the core ones from cordova contacts plugin:

    • anyName: to access to the first available name of the contact between all fields from cordova
    • anyPhotoUrl: to access the first available photo as an URL (normally file://)
    • anyPhoneNumber: to access the first available phone number
    • anyURL: to access the first available URL
    • anyEmail: to access the first available email address

Running Tests

  • ember test
  • ember test --server

For more information on using ember-cli, visit http://www.ember-cli.com/.

Keywords

FAQs

Package last updated on 23 Jan 2015

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc