New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

posterior

Package Overview
Dependencies
Maintainers
1
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

posterior

Hierarchical configuration of JSON XHR communication for your APIs

  • 0.17.0
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Posterior Give your backend services intuitive front-end interfaces (uses XHR, JSON, Promise) via declarative, hierarchical configurations.

Download: posterior.min.js or posterior.js
Bower: bower install posterior
NPM: npm install posterior

Build Status npm version npm

Example

var GitHub = new Posterior({
    url: 'https://api.github.com',
    load: function() {
        console.log('Requested:', this.cfg.url);
    },
    ESHA: {
        url: '/repos/esha/{0}',
        Version: {
            follows: 'tags_url',
            then: function(tags) {
                return tags[0].name;
            }
        }
    }
}, 'GitHub');

GitHub.ESHA.Version('posterior');

Release History

  • 2014-09-08 v0.1.4 (initial)
  • 2014-09-09 v0.2.3 (debug mode, preprocess, no global)
  • 2014-09-16 v0.3.1 (timeout->error, async fix, direct XHR cfg, status mapping)
  • 2014-09-17 v0.4.0 (retry options, css activity notification)
  • 2014-09-19 v0.5.4 (XHR tests, json cfg shortcut, better structure, safer copy, responseObject property, et al)
  • 2014-09-24 v0.6.2 (s/serialize/transformData, s/preprocess/configure, better debug output)
  • 2014-10-13 v0.7.3 (support all XHR events, JSON default, resolve/reject promise with response/error, request/responseData handler support)
  • 2015-03-12 v0.9.3 (switch to better Promise polyfill, rename to Posterior, support 'parent' property, expose config props with getters)
  • 2015-07-28 v0.10.1 (fix retry, cache, and require features)
  • 2015-08-05 v0.11.0 (support both ${key} and {key} in URL templates)
  • 2015-08-08 v0.12.0 (s/share(d)Result/save(d)Result, and support dynamic link relations via new 'follows' property)
  • 2015-08-13 v0.13.0 (upgrade config string filling to also resolve args by index and nested data)
  • 2016-05-18 v0.14.1 (support failure listener for non-200 status codes, pass XHR to configured catch functions, don't override specified Accept or Content-Type headers)
  • 2016-05-20 v0.15.0 (API.resolve can now support repeated replacements when consuming data, consume array data, and is easier to use as util)
  • 2016-05-23 v0.16.0 (add throttle:{key,ms} support)
  • 2017-03-27 v0.17.0 (distinguish subfunction from props via capitalization or @, bind then/catch functions to built cfg)

Keywords

FAQs

Package last updated on 28 Mar 2017

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