Socket
Socket
Sign inDemoInstall

squid-core

Package Overview
Dependencies
53
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    squid-core

Device's shared agnostic code


Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Install size
2.66 MB
Created
Weekly downloads
 

Changelog

Source

0.4.11 - 2015-11-26

Changed:

  • add remove, length and clear methods to Storage class
  • update unit test

Readme

Source

SQUID Core

Device agnostic shared code for OSX and IOS.

Package include
  • Configuration files based on environment
  • Unit tests
  • Backbone's Models
  • Backbone's Collections
  • Reflux Actions
  • Reflux Stores
  • Utils:
    • Github API services wrapper
    • Logger class
    • Storage abstraction class
Dependencies

Squid is build on top of cool open source projects such as:

  • React.js
  • Reflux
  • Lodash
  • Backbone
  • Winston
  • Squid Config

All data are served by the Github API.


Table of Content

Installation

This package is not intended to be used as a stand alone library but you might need to install it for development purpose with the following command:

$ npm install
Github app configuration

The application client ID and his secret are stored into a JSON file called github.json at the project's root. For obvious security reasons this file is not published. See Unit Tests' section for more details about file content.

Basic usage examples

// New Squid Core instance
var SquidCore = require('squid-core')

// Setup instance with custon settings
SquidCore.setup({
    locale:   {
        logger: false
      , github: {
          credentials: {
              client_id:     GITHUB.client_id
            , client_secret: GITHUB.client_secret
          }
        }
    }
  , envName: 'test'
})

SquidCore._VERSION // return '0.4.0'

// Get config value
SquidCore
  .getConfig('github.pagination') // return '50'

// New User model
var username = 'michael'
  , model    = SquidCore.model('user')
  , user     = new model({ name: username })

user.get('name') // return 'michael'

Unit Tests

First you need to add the ./github.json to the package root with the following content:

{
  "client_id":     "xxxx",
  "client_secret": "xxxx"
  "username":      "a-valid-gitub-username",
  "password":      "a-valid-gitub-password",
  "token":         "a-valid-oauth-token-or-false"
}

Then run the following command to perform unit tests:

$ npm test

Roadmap

See the roadmap future developments.

License

Squid is MIT licensed

Contributing

In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code.

Keywords

FAQs

Last updated on 26 Nov 2015

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