New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

crs-modules

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

crs-modules - npm Package Compare versions

Comparing version 1.0.11 to 1.0.12

2

crs-modules.js

@@ -1,1 +0,1 @@

export class Modules{constructor(){this.registry={}}async dispose(){await this.clear(),this.registry=null}async clear(){const s=Object.keys(this.registry);for(let t of s)delete this.registry[t]}async add(s,t){null==this.registry[s]&&(this.registry[s]=t)}async remove(s){delete this.registry[s]}async get(s){if(null==this.registry[s])return;let t=this.registry[s];return"string"==typeof t&&(t=await import(t),this.registry[s]=t),t}async getDefault(s){return(await this.get(s))?.default}async getPrototype(s,t){return(await this.get(s))?.[t||s]}async getInstanceOf(s,t,...e){const a=await this.getPrototype(s,t||s);return a?new a(...e):null}async getInstanceOfDefault(s,...t){const e=await this.getDefault(s);return e?new e(...t):null}async call(s,t,e,...a){const l=(await this.get(s))?.[e||s];return await(l?.call(t,...a))}async callDefault(s,t,...e){const a=await this.getDefault(s);return await(a?.call(t,...e))}}globalThis.crs=globalThis.crs||{},globalThis.crs.modules=new Modules,globalThis.crs.modules.enableBinding=async s=>{for(let t of s||[])await globalThis.crs.modules.add(t[0],t[1]);null!=globalThis.crsbinding&&(globalThis.crs.modules._parseElement=globalThis.crsbinding.parsers.parseElement,globalThis.crsbinding.parsers.parseElement=async(s,t,e)=>{await globalThis.crs.modules._parseElement(s,t,e),globalThis.crs.modules.get(s.nodeName.toLowerCase())})};
export class Modules{constructor(){this.registry={}}async dispose(){await this.clear(),this.registry=null}async clear(){const t=Object.keys(this.registry);for(let s of t)delete this.registry[s]}async add(t,s){null==this.registry[t]&&(this.registry[t]=s)}async remove(t){delete this.registry[t]}async get(t){if(null==this.registry[t])return;let s=this.registry[t];return"string"==typeof s&&(s=await import(s),this.registry[t]=s),s}async getDefault(t){return(await this.get(t))?.default}async getConstant(t,s){return(await this.get(t))?.[s]}async getPrototype(t,s){return(await this.get(t))?.[s||t]}async getInstanceOf(t,s,...e){const a=await this.getPrototype(t,s||t);return a?new a(...e):null}async getInstanceOfDefault(t,...s){const e=await this.getDefault(t);return e?new e(...s):null}async call(t,s,e,...a){const r=(await this.get(t))?.[e||t];return await(r?.call(s,...a))}async callDefault(t,s,...e){const a=await this.getDefault(t);return await(a?.call(s,...e))}}globalThis.crs=globalThis.crs||{},globalThis.crs.modules=new Modules,globalThis.crs.modules.enableBinding=async t=>{for(let s of t||[])await globalThis.crs.modules.add(s[0],s[1]);null!=globalThis.crsbinding&&(globalThis.crs.modules._parseElement=globalThis.crsbinding.parsers.parseElement,globalThis.crsbinding.parsers.parseElement=async(t,s,e)=>{await globalThis.crs.modules._parseElement(t,s,e),globalThis.crs.modules.get(t.nodeName.toLowerCase())})};
{
"name": "crs-modules",
"version": "1.0.11",
"version": "1.0.12",
"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