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

api-testing

Package Overview
Dependencies
Maintainers
20
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

api-testing - npm Package Compare versions

Comparing version 1.1.0 to 1.2.0

README.md.orig

3

CHANGELOG.md

@@ -5,1 +5,4 @@ ## 1.1.0 / 2020-06-09

* Updated eslint rules
## 1.2.0 / 2020-06-22
* Add utility function in action API for creating change tags.

@@ -10,5 +10,34 @@ 'use strict';

const singletons = {};
let cachedTags = {};
module.exports = {
/**
* Add tag to database if not already added.
*
* @param {string} tag name
* @return {Promise<string>} tag name
*/
async makeTag(tag) {
if (cachedTags[tag]) {
return tag;
}
const root = await this.root();
const tagList = await root.list('tags', { tglimit: 50 });
const existingTags = tagList.reduce((obj, row) => {
obj[row.name] = true;
return obj;
}, {});
if (!existingTags[tag]) {
const { managetags } = await root.action('managetags', {
operation: 'create',
tag,
token: await root.token()
}, true);
assert.isOk(managetags.tag);
}
cachedTags = { ...existingTags };
return tag;
},
async root() {

@@ -15,0 +44,0 @@ if (singletons.root) {

2

package.json
{
"name": "api-testing",
"version": "1.1.0",
"version": "1.2.0",
"description": "",

@@ -5,0 +5,0 @@ "main": "index.js",

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