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

asc

Package Overview
Dependencies
Maintainers
2
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

asc - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

test/lib/util.js

81

.eslintrc.json

@@ -12,27 +12,35 @@ {

},
"globals": {
"localRequire": true
},
"rules": {
"camelcase": "error",
"comma-dangle": [
"error",
"never"
],
"comma-style": [
"error",
"last"
],
"curly": "error",
"strict": [
"default-case": "error",
"dot-location": [
"error",
"global"
"property"
],
"dot-notation": [
"error",
{
"allowKeywords": true
}
],
"eqeqeq": "error",
"no-console": [ "off" ],
"no-undefined": [ "off" ],
"vars-on-top": "error",
"no-useless-return": "error",
"no-unused-expressions": "error",
"no-throw-literal": "error",
"no-return-assign": "error",
"no-new": "error",
"no-multi-spaces": "error",
"no-loop-func": "error",
"no-implicit-globals": "error",
"no-floating-decimal": "error",
"no-extend-native": "error",
"no-eq-null": "error",
"wrap-iife": [ "error", "inside" ],
"getter-return": [
"error",
{
"allowImplicit": false
}
],
"guard-for-in": "error",
"default-case": "error",
"dot-location": [ "error", "property" ],
"indent": [

@@ -45,7 +53,24 @@ "error",

],
"dot-notation": [ "error", { "allowKeywords": true } ],
"linebreak-style": [
"off"
],
"new-cap": [
"error",
"unix"
{ "newIsCap": true }
],
"no-eq-null": "error",
"no-extend-native": "error",
"no-floating-decimal": "error",
"no-implicit-globals": "error",
"no-loop-func": "error",
"no-multi-spaces": "error",
"no-new": "error",
"no-return-assign": "error",
"no-throw-literal": "error",
"no-undefined": "error",
"no-prototype-builtins": "off",
"no-unused-expressions": "error",
"no-useless-return": "error",
"no-var": "error",
"one-var": [ "error", "never" ],
"quotes": [

@@ -59,9 +84,13 @@ "error",

],
"getter-return": [
"space-in-parens": [ "error", "always" ],
"strict": [
"error",
{
"allowImplicit": false
}
"global"
],
"vars-on-top": "error",
"wrap-iife": [
"error",
"inside"
]
}
}
}

@@ -128,3 +128,5 @@ 'use strict';

const generateSetHandler = ( handler ) => {
return ( key, data, done ) => {
handler( key, data, () => {

@@ -134,3 +136,5 @@ // ignore any errors or data the handler returns

} );
};
};

@@ -157,3 +161,3 @@

if ( typeof layer.get !== 'function' ) {
throw new Error( 'layer ' + i + ' is missing get function' )
throw new Error( 'layer ' + i + ' is missing get function' );
}

@@ -190,7 +194,3 @@

* @param { any } data Can be anything. The in-memory layer built in to ASC can store anything, including resource handles, but it is up to your layers to be able to handle storage of whatever can be passed here.
* @param { function(
* {Error} err?,
* {any} data The first layer to return data will route to here. Any layers above the layer that returned data, will have their set() method called. It is up to your layers to handle storage of whatever data types lower layers return.
* )
* } done Will call back with no arguments, or first argument will be instance of Error if any of the layers errors out.
* @param { ErrorDataCallback } done Will call back with no arguments, or first argument will be instance of Error if any of the layers errors out.
*/

@@ -321,5 +321,6 @@ get( key, done ) {

*
*
* @param { any } key Can be any object or scalar, but must be serializable as JSON.
* @param { any } data Can be anything. The in-memory layer built in to ASC can store anything, including resource handles, but it is up to your layers to be able to handle storage of whatever can be passed here.
* @param { function({Error} err?) } done Will call back with no arguments, or first argument will be instance of Error if any of the layers errors out.
* @param { ErrorCallback } done Will call back with no arguments, or first argument will be instance of Error if any of the layers errors out.
*/

@@ -362,2 +363,19 @@ set( key, data, done ) {

/**
* This callback only accepts an optional Error, no data
*
* @callback ErrorCallback
*
* @param {Error} [err]
*/
/**
* This callback only accepts an optional Error, no data
*
* @callback ErrorDataCallback
*
* @param {Error} [err]
* @param {any} data
*/
module.exports = ASC;
{
"name": "asc",
"description": "A middleware layer between a service and a client. The service could be an in-process library, a file, an external web service, anything. Any time the results from a resource call can be cached, you can use ASC as a proxy to that resource.",
"version": "2.0.0",
"version": "2.0.1",
"author": "Anthony Hildoer <anthony@bluerival.com>",

@@ -15,8 +15,10 @@ "repository": {

"dependencies": {
"async": "^2.6.2",
"doublescore": "^0.3.7"
"async": "2.6.2",
"doublescore": "1.0.0"
},
"devDependencies": {
"@types/mocha": "^5.2.6",
"mocha": "^6.1.4"
"@types/mocha": "5.2.7",
"eslint": "6.1.0",
"glob": "7.1.4",
"mocha": "6.2.0"
},

@@ -23,0 +25,0 @@ "keywords": [

@@ -11,3 +11,3 @@ # ASC (pronounced "ASK")

# New 2.0.0
# New 2.x

@@ -14,0 +14,0 @@ This is a major re-write to the previous version. The previous version is 1.x

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