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

unio

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

unio - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

4

lib/unio.js

@@ -172,3 +172,5 @@ var request = require('request')

// check for a match in the resource name or path
var nameMatch = rgxName.test(resource) || rgxPath.test(resource)
var nameMatch = (normName && rgxName.test(resource))
|| (normPath && rgxPath.test(resource))
// check that the verbs allowed with this resource match `verb`

@@ -175,0 +177,0 @@ var verbMatch = candidate.methods.indexOf(verb) !== -1

{
"name": "unio",
"version": "1.0.1",
"version": "1.0.2",
"description": "One REST API Client for All.",

@@ -5,0 +5,0 @@ "main": "lib/unio.js",

@@ -93,3 +93,3 @@ #unio

//
// add a new spec directly
// add a new spec
//

@@ -112,2 +112,3 @@ var apiSpec = {

// add the spec to the client, then use it and start making requests!
unio()

@@ -120,3 +121,2 @@ .spec(apiSpec)

```

@@ -214,4 +214,17 @@

Each object in the `resources` array represents a resource. Each resource must contain the following keys:
Each object in the `resources` array represents a REST API resource. For example, a `GET user` resource taking three optional parameters (id, name, and location) would look like this:
```javascript
{
path: 'user',
methods: [ 'get' ],
params: {
id: 'optional',
name: 'optional',
location: 'optional'
}
}
```
Each of the resource keys are described below:
####`path` (String)

@@ -223,3 +236,3 @@

Optional name of the resource. When you make a request with unio, for example with `.get(resource, ...)`, you can specify the resource by its `name` value rather than by its `path`. Think of it like an alias `path` value for the resource.
**Optional** name of the resource. When you make a request with unio, for example with `.get(resource, ...)`, you can specify the resource by its `name` value rather than by its `path`. Think of it like an alias `path` value for the resource.

@@ -226,0 +239,0 @@ E.g. If the following resource is specified:

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