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

@ribajs/utils

Package Overview
Dependencies
Maintainers
2
Versions
59
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ribajs/utils - npm Package Compare versions

Comparing version 1.9.0-beta.0 to 1.9.0-beta.1

4

package.json
{
"name": "@ribajs/utils",
"description": "Utils module of Riba.js",
"version": "1.9.0-beta.0",
"version": "1.9.0-beta.1",
"author": "Pascal Garber <pascal@artandcode.studio>",

@@ -44,5 +44,5 @@ "contributors": [

"@babel/runtime-corejs3": "^7.11.2",
"@ribajs/tsconfig": "1.9.0-beta.0",
"@ribajs/tsconfig": "1.9.0-beta.1",
"babel-jest": "^26.3.0"
}
}

@@ -261,1 +261,21 @@ export const couldBeJson = (str?: string | null) => {

};
// Get the class "that"
/**
*
* @param that
*/
export const classOf = (that: any) => {
return that.constructor;
};
/**
* TODO: Would like to do it with class parameter T for the parent class:
*
export function classOf<T = any>(that: T) {
return that.constructor as typeof T;
};
*
* but getting TypeScript error:
* Property 'constructor' does not exist on type 'T'.
*/
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