Socket
Socket
Sign inDemoInstall

@availity/api-core

Package Overview
Dependencies
Maintainers
5
Versions
120
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@availity/api-core - npm Package Compare versions

Comparing version 1.0.0-alpha.12 to 1.0.0-alpha.13

6

package.json
{
"name": "@availity/api-core",
"version": "1.0.0-alpha.12",
"version": "1.0.0-alpha.13",
"description": "Base API definitions for the Availity REST API",

@@ -17,6 +17,6 @@ "keywords": [

"peerDependencies": {
"@availity/localstorage-core": "^1.0.0-alpha.12"
"@availity/localstorage-core": "^1.0.0-alpha.13"
},
"devDependencies": {
"@availity/localstorage-core": "^1.0.0-alpha.12"
"@availity/localstorage-core": "^1.0.0-alpha.13"
},

@@ -23,0 +23,0 @@ "publishConfig": {

@@ -24,2 +24,14 @@ import AvApi from '../api';

}
normalize(providers) {
const cloned = providers.slice();
cloned.forEach(provider => {
provider.name = provider.businessName
? provider.businessName
: `${provider.lastName}, ${provider.firstName}`;
});
return cloned;
}
}

@@ -68,2 +68,5 @@ # Availity API's

##### `normalize(providers)`
Helper method that adds `name` field to the `providers` collection. The name field is computed from other properies of the provider object.
### AvLogMessage

@@ -70,0 +73,0 @@ Create a log message.

@@ -62,2 +62,24 @@ import AvProviders from '../providers';

});
test('normalize() should add name atttribute to collection', () => {
api = new AvProviders({
http: mockHttp,
promise: Promise,
merge: mockMerge,
config: {},
});
const providers = api.normalize([
{
businessName: 'a',
},
{
lastName: 'b',
firstName: 'c',
},
]);
expect(providers[0].name).toBe('a');
expect(providers[1].name).toBe('b, c');
});
});
SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc