+8
-0
@@ -6,2 +6,10 @@ 'use strict' | ||
| refs = 0 // read-only | ||
| constructor () { | ||
| if (!global.Pear) throw new Error('pear-ref is designed for use with Pear') | ||
| const REF = global.Pear?.[global.Pear?.constructor.REF] | ||
| if (REF) return REF // all apps use the same ref counter | ||
| super() | ||
| } | ||
| ref () { | ||
@@ -8,0 +16,0 @@ this.refs++ |
+1
-1
| { | ||
| "name": "pear-ref", | ||
| "version": "1.0.1", | ||
| "version": "1.0.2", | ||
| "main": "index.js", | ||
@@ -5,0 +5,0 @@ "type": "commonjs", |
+2
-2
@@ -5,3 +5,3 @@ # pear-ref | ||
| # Usage | ||
| ## Usage | ||
@@ -20,4 +20,4 @@ ```js | ||
| # License | ||
| ## License | ||
| Apache-2.0 |
12858
1.9%28
27.27%