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

nyks

Package Overview
Dependencies
Maintainers
3
Versions
252
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nyks - npm Package Compare versions

Comparing version 5.0.0 to 5.0.1

color/hexToRgb.js

6

package.json
{
"name": "nyks",
"version": "5.0.0",
"version": "5.0.1",
"description": "nodejs exupery style",

@@ -42,4 +42,4 @@ "keywords": [

"mocha": "node node_modules/mocha/bin/_mocha",
"jscs": "jscs --config=node_modules/ivs-jssc/ivs-node.jscsrc test",
"eslint": "eslint --config=node_modules/ivs-jssc/ivs-node.eslintrc.js test",
"jscs": "jscs --config=node_modules/ivs-jssc/ivs-node.jscsrc test array async buffer child_process collection color crypto date fs function http lang math object os path process promise require stream string",
"eslint": "eslint --config=node_modules/ivs-jssc/ivs-node.eslintrc.js test array async buffer child_process collection color crypto date fs function http lang math object os path process promise require stream string",
"checkall": "npm run jscs && npm run eslint",

@@ -46,0 +46,0 @@ "cover": "node node_modules/istanbul/lib/cli.js cover --report text-summary --report html --report lcov node_modules/mocha/bin/_mocha --recursive",

@@ -211,5 +211,5 @@ # Async

<a name="timeout"></a>
## timeout(time) : Promise
## timeout(fn, time[, ctx]) : Promise
Reject (throw) if timeout is reached.
return a Promise that throw if 'fn' is not finished avec 'time'.

@@ -221,7 +221,11 @@ ```javascript

let zzz = sleep(3000);
let crash = timeout(2000);
let fn = async function() {
sleep(2000);
return 'ok';
}
await Promise.all([zzz, crash]); // this is going to throw after 2 secondes
await timeout(fn, 3000); // return 'ok'
await timeout(fn, 1000); // this will throw with message 'timeout'
})();

@@ -228,0 +232,0 @@ ```

"use strict";
module.exports = function(str) {
var hex = String(str).match(/^#?(\w{1,2})(\w{1,2})(\w{1,2})$/);
return (hex) ? hex.slice(1) : null;
};
//alias
const that = require('../color/hexToRgb');
module.exports = that;
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