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

@glimmer/reference

Package Overview
Dependencies
Maintainers
12
Versions
286
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@glimmer/reference - npm Package Compare versions

Comparing version 0.76.0 to 0.77.0

6

dist/amd/es5/glimmer-reference.js

@@ -266,3 +266,3 @@ define('@glimmer/reference', ['exports', '@glimmer/env', '@glimmer/global-context', '@glimmer/util', '@glimmer/validator'], function (exports, env, globalContext, util, validator) { 'use strict';

_proto.set = function set(key, value) {
if (util.isObject(key) || typeof key === 'function') {
if (util.isObject(key)) {
this.weakMap.set(key, value);

@@ -275,3 +275,3 @@ } else {

_proto.get = function get(key) {
if (util.isObject(key) || typeof key === 'function') {
if (util.isObject(key)) {
return this.weakMap.get(key);

@@ -495,2 +495,2 @@ } else {

});
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2xpbW1lci1yZWZlcmVuY2UuanMiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3BhY2thZ2VzL0BnbGltbWVyL3JlZmVyZW5jZS9saWIvcmVmZXJlbmNlLnRzIiwiLi4vLi4vLi4vLi4vLi4vLi4vcGFja2FnZXMvQGdsaW1tZXIvcmVmZXJlbmNlL2xpYi9pdGVyYWJsZS50cyJdLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBERUJVRyB9IGZyb20gJ0BnbGltbWVyL2Vudic7XG5pbXBvcnQgeyBnZXRQcm9wLCBzZXRQcm9wIH0gZnJvbSAnQGdsaW1tZXIvZ2xvYmFsLWNvbnRleHQnO1xuaW1wb3J0IHsgT3B0aW9uIH0gZnJvbSAnQGdsaW1tZXIvaW50ZXJmYWNlcyc7XG5pbXBvcnQgeyBleHBlY3QsIGlzRGljdCwgc3ltYm9sIH0gZnJvbSAnQGdsaW1tZXIvdXRpbCc7XG5pbX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BQUcsS0FBZCxPQUFBOztFQUNBLFFBQUksT0FBTyxDQUFQLElBQUEsS0FBSixPQUFBLEVBQThCO0VBQzVCLFdBQUEsT0FBQSxHQUFlO0VBQUUsUUFBQSxJQUFJLEVBQUU7RUFBUixPQUFmO0VBQ0EsTUFBQSxLQUFLLEdBQUcsT0FBTyxDQUFmLEtBQUE7RUFGRixLQUFBLE1BR08sSUFBSSxLQUFBLEdBQUEsSUFBWSxLQUFBLFFBQUEsQ0FBQSxNQUFBLEdBQWhCLENBQUEsRUFBMEM7RUFDL0MsYUFBQSxJQUFBO0VBREssS0FBQSxNQUVBO0VBQ0wsTUFBQSxLQUFLLEdBQUcsS0FBQSxRQUFBLENBQWMsRUFBRSxLQUF4QixHQUFRLENBQVI7RUFDRDs7RUFYQyxRQWFJLE1BYkosR0FhRixJQWJFLENBYUksTUFiSjtFQWVGLFFBQUksR0FBRyxHQUFHLE1BQU0sQ0FBQSxLQUFBLEVBQWdCLEtBQWhDLEdBQWdCLENBQWhCO0VBQ0EsUUFBSSxJQUFJLEdBQUcsS0FBWCxHQUFBO0VBRUEsV0FBTztFQUFFLE1BQUEsR0FBRixFQUFFLEdBQUY7RUFBTyxNQUFBLEtBQVAsRUFBTyxLQUFQO0VBQWMsTUFBQSxJQUFBLEVBQUE7RUFBZCxLQUFQO0VBQ0Q7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7In0=

@@ -77,3 +77,3 @@ "use strict";

set(key, value) {
if ((0, _util.isObject)(key) || typeof key === 'function') {
if ((0, _util.isObject)(key)) {
this.weakMap.set(key, value);

@@ -86,3 +86,3 @@ } else {

get(key) {
if ((0, _util.isObject)(key) || typeof key === 'function') {
if ((0, _util.isObject)(key)) {
return this.weakMap.get(key);

@@ -255,2 +255,2 @@ } else {

}
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3BhY2th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H07XG4gICAgfSBlbHNlIHtcbiAgICAgIHRoaXMuY3VycmVudCA9IHsga2luZDogJ2ZpcnN0JywgdmFsdWU6IGl0ZXJhdG9yW3RoaXMucG9zXSB9O1xuICAgIH1cbiAgfVxuXG4gIGlzRW1wdHkoKTogYm9vbGVhbiB7XG4gICAgcmV0dXJuIHRoaXMuY3VycmVudC5raW5kID09PSAnZW1wdHknO1xuICB9XG5cbiAgbmV4dCgpOiBPcHRpb248SXRlcmF0aW9uSXRlbTx1bmtub3duLCBudW1iZXI+PiB7XG4gICAgbGV0IHZhbHVlOiB1bmtub3duO1xuXG4gICAgbGV0IGN1cnJlbnQgPSB0aGlzLmN1cnJlbnQ7XG4gICAgaWYgKGN1cnJlbnQua2luZCA9PT0gJ2ZpcnN0Jykge1xuICAgICAgdGhpcy5jdXJyZW50ID0geyBraW5kOiAncHJvZ3Jlc3MnIH07XG4gICAgICB2YWx1ZSA9IGN1cnJlbnQudmFsdWU7XG4gICAgfSBlbHNlIGlmICh0aGlzLnBvcyA+PSB0aGlzLml0ZXJhdG9yLmxlbmd0aCAtIDEpIHtcbiAgICAgIHJldHVybiBudWxsO1xuICAgIH0gZWxzZSB7XG4gICAgICB2YWx1ZSA9IHRoaXMuaXRlcmF0b3JbKyt0aGlzLnBvc107XG4gICAgfVxuXG4gICAgbGV0IHsga2V5Rm9yIH0gPSB0aGlzO1xuXG4gICAgbGV0IGtleSA9IGtleUZvcih2YWx1ZSBhcyBEaWN0LCB0aGlzLnBvcyk7XG4gICAgbGV0IG1lbW8gPSB0aGlzLnBvcztcblxuICAgIHJldHVybiB7IGtleSwgdmFsdWUsIG1lbW8gfTtcbiAgfVxufVxuIl0sInNvdXJjZVJvb3QiOiIifQ==

@@ -87,3 +87,3 @@ "use strict";

_proto.set = function set(key, value) {
if ((0, _util.isObject)(key) || typeof key === 'function') {
if ((0, _util.isObject)(key)) {
this.weakMap.set(key, value);

@@ -96,3 +96,3 @@ } else {

_proto.get = function get(key) {
if ((0, _util.isObject)(key) || typeof key === 'function') {
if ((0, _util.isObject)(key)) {
return this.weakMap.get(key);

@@ -292,2 +292,2 @@ } else {

}();
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3BhY2thZ2VzL0BnbGltbWVyL3JlZmVyZW5jZS9saWIvaXRlcmFibGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7QUFBQTs7QUFFQTs7QUFDQTs7QUFDQTs7QUFDQTs7Ozs7Ozs7Ozs7Ozs7Ozs7O0FBNEJBLElBQU0sYUFBYSxHQUFuQixFQUFBOztBQUVBLElBQU0sR0FBRyxHQUFXLFNBQWQsR0FBYyxDQUFBLENBQUEsRUFBQSxLQUFBLEVBQUE7QUFBQSxTQUFwQixLQUFvQjtBQUFwQixDQUFBOztBQUNBLElBQU0sS0FBSyxHQUFXLFNBQWhCLEtBQWdCLENBQUEsQ0FBQSxFQUFBLEtBQUEsRUFBQTtBQUFBLFNBQWMsTUFBTSxDQUExQyxLQUEwQyxDQUFwQjtBQUF0QixDQUFBOztBQUNBLElBQU0sUUFBUSxHQUFZLFNBQXBCLFFBQW9CLENBQUQsSUFBQyxFQUFRO0FBQ2hDLE1BQUksSUFBSSxLQUFSLElBQUEsRUFBbUI7QUFDakI7QUFDQTtBQUNBLFdBQUEsYUFBQTtBQUNEOztBQUVELFNBQUEsSUFBQTtBQVBGLENBQUE7O0FBVUEsU0FBQSxVQUFBLENBQUEsSUFBQSxFQUFnQztBQUM5QixNQUFJLGNBQVMsSUFBSSxDQUFKLENBQUksQ0FBSixLQUFiLEdBQUEsRUFBOEI7QUFDNUIsVUFBTSxJQUFBLEtBQUEsQ0FBQSx1QkFBTixJQUFNLEdBQU4sNkNBQU0sQ0FBTjtBQUNEOztBQUNELFNBQU8sWUFBWSxDQUFFLFVBQUQsSUFBQyxFQUFEO0FBQUEsV0FBVSw0QkFBTyxJQUFQLEV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wb3MgPj0gdGhpcy5pdGVyYXRvci5sZW5ndGggLSAxKSB7XG4gICAgICByZXR1cm4gbnVsbDtcbiAgICB9IGVsc2Uge1xuICAgICAgdmFsdWUgPSB0aGlzLml0ZXJhdG9yWysrdGhpcy5wb3NdO1xuICAgIH1cblxuICAgIGxldCB7IGtleUZvciB9ID0gdGhpcztcblxuICAgIGxldCBrZXkgPSBrZXlGb3IodmFsdWUgYXMgRGljdCwgdGhpcy5wb3MpO1xuICAgIGxldCBtZW1vID0gdGhpcy5wb3M7XG5cbiAgICByZXR1cm4geyBrZXksIHZhbHVlLCBtZW1vIH07XG4gIH1cbn1cbiJdLCJzb3VyY2VSb290IjoiIn0=

@@ -64,3 +64,3 @@ import { getPath, toIterator } from '@glimmer/global-context';

set(key, value) {
if (isObject(key) || typeof key === 'function') {
if (isObject(key)) {
this.weakMap.set(key, value);

@@ -73,3 +73,3 @@ } else {

get(key) {
if (isObject(key) || typeof key === 'function') {
if (isObject(key)) {
return this.weakMap.get(key);

@@ -241,2 +241,2 @@ } else {

}
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3BhY2thZ2VzL0BnbGltbWVyL3JlZmVyZW5jZS9saWIvaXRlcmFibGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsU0FBUyxPQUFULEVBQWtCLFVBQWxCLFFBQW9DLHlCQUFwQztBQUVBLFNBQVMsV0FBVCxFQUFzQixRQUF0QixRQUFzQyxlQUF0QztBQUNBLFNBQVMsS0FBVCxRQUFzQixjQUF0QjtBQUNBLFNBQVMsU0FBVCxFQUFvQixVQUFwQixFQUFnQyxRQUFoQyxRQUFnRCxvQkFBaEQ7QUFDQSxTQUEwQyxXQUExQyxFQUF1RCxnQkFBdkQsUUFBK0UsYUFBL0U7QUE0QkEsTUFBTSxhQUFhLEdBQUcsRUFBdEI7O0FBRUEsTUFBTSxHQUFHLEdBQ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B0aGlzLmN1cnJlbnQgPSB7IGtpbmQ6ICdlbXB0eScgfTtcbiAgICB9IGVsc2Uge1xuICAgICAgdGhpcy5jdXJyZW50ID0geyBraW5kOiAnZmlyc3QnLCB2YWx1ZTogaXRlcmF0b3JbdGhpcy5wb3NdIH07XG4gICAgfVxuICB9XG5cbiAgaXNFbXB0eSgpOiBib29sZWFuIHtcbiAgICByZXR1cm4gdGhpcy5jdXJyZW50LmtpbmQgPT09ICdlbXB0eSc7XG4gIH1cblxuICBuZXh0KCk6IE9wdGlvbjxJdGVyYXRpb25JdGVtPHVua25vd24sIG51bWJlcj4+IHtcbiAgICBsZXQgdmFsdWU6IHVua25vd247XG5cbiAgICBsZXQgY3VycmVudCA9IHRoaXMuY3VycmVudDtcbiAgICBpZiAoY3VycmVudC5raW5kID09PSAnZmlyc3QnKSB7XG4gICAgICB0aGlzLmN1cnJlbnQgPSB7IGtpbmQ6ICdwcm9ncmVzcycgfTtcbiAgICAgIHZhbHVlID0gY3VycmVudC52YWx1ZTtcbiAgICB9IGVsc2UgaWYgKHRoaXMucG9zID49IHRoaXMuaXRlcmF0b3IubGVuZ3RoIC0gMSkge1xuICAgICAgcmV0dXJuIG51bGw7XG4gICAgfSBlbHNlIHtcbiAgICAgIHZhbHVlID0gdGhpcy5pdGVyYXRvclsrK3RoaXMucG9zXTtcbiAgICB9XG5cbiAgICBsZXQgeyBrZXlGb3IgfSA9IHRoaXM7XG5cbiAgICBsZXQga2V5ID0ga2V5Rm9yKHZhbHVlIGFzIERpY3QsIHRoaXMucG9zKTtcbiAgICBsZXQgbWVtbyA9IHRoaXMucG9zO1xuXG4gICAgcmV0dXJuIHsga2V5LCB2YWx1ZSwgbWVtbyB9O1xuICB9XG59XG4iXSwic291cmNlUm9vdCI6IiJ9
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3BhY2thZ2VzL0BnbGltbWVyL3JlZmVyZW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YXMgRGljdCwgdGhpcy5wb3MpO1xuICAgIGxldCBtZW1vID0gdGhpcy5wb3M7XG5cbiAgICByZXR1cm4geyBrZXksIHZhbHVlLCBtZW1vIH07XG4gIH1cbn1cbiJdLCJzb3VyY2VSb290IjoiIn0=

@@ -62,3 +62,3 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }

_proto.set = function set(key, value) {
if (isObject(key) || typeof key === 'function') {
if (isObject(key)) {
this.weakMap.set(key, value);

@@ -71,3 +71,3 @@ } else {

_proto.get = function get(key) {
if (isObject(key) || typeof key === 'function') {
if (isObject(key)) {
return this.weakMap.get(key);

@@ -266,2 +266,2 @@ } else {

}();
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3BhY2thZ2VzL0BnbGltbWVyL3JlZmVyZW5jZS9saWIvaXRlcmFibGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7OztBQUFBLFNBQUEsT0FBQSxFQUFBLFVBQUEsUUFBQSx5QkFBQTtBQUVBLFNBQUEsV0FBQSxFQUFBLFFBQUEsUUFBQSxlQUFBO0FBQ0EsU0FBQSxLQUFBLFFBQUEsY0FBQTtBQUNBLFNBQUEsU0FBQSxFQUFBLFVBQUEsRUFBQSxRQUFBLFFBQUEsb0JBQUE7QUFDQSxTQUFBLFdBQUEsRUFBQSxnQkFBQSxRQUFBLGFBQUE7QUE0QkEsSUFBTSxhQUFhLEdBQW5CLEVBQUE7O0FBRUEsSUFBTSxHQUFHLEdBQVcsU0FBZCxHQUFjLENBQUEsQ0FBQSxFQUFBLEtBQUE7QUFBQSxTQUFwQixLQUFvQjtBQUFBLENBQXBCOztBQUNBLElBQU0sS0FBSyxHQUFXLFNBQWhCLEtBQWdC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ID0geyBraW5kOiAnZmlyc3QnLCB2YWx1ZTogaXRlcmF0b3JbdGhpcy5wb3NdIH07XG4gICAgfVxuICB9XG5cbiAgaXNFbXB0eSgpOiBib29sZWFuIHtcbiAgICByZXR1cm4gdGhpcy5jdXJyZW50LmtpbmQgPT09ICdlbXB0eSc7XG4gIH1cblxuICBuZXh0KCk6IE9wdGlvbjxJdGVyYXRpb25JdGVtPHVua25vd24sIG51bWJlcj4+IHtcbiAgICBsZXQgdmFsdWU6IHVua25vd247XG5cbiAgICBsZXQgY3VycmVudCA9IHRoaXMuY3VycmVudDtcbiAgICBpZiAoY3VycmVudC5raW5kID09PSAnZmlyc3QnKSB7XG4gICAgICB0aGlzLmN1cnJlbnQgPSB7IGtpbmQ6ICdwcm9ncmVzcycgfTtcbiAgICAgIHZhbHVlID0gY3VycmVudC52YWx1ZTtcbiAgICB9IGVsc2UgaWYgKHRoaXMucG9zID49IHRoaXMuaXRlcmF0b3IubGVuZ3RoIC0gMSkge1xuICAgICAgcmV0dXJuIG51bGw7XG4gICAgfSBlbHNlIHtcbiAgICAgIHZhbHVlID0gdGhpcy5pdGVyYXRvclsrK3RoaXMucG9zXTtcbiAgICB9XG5cbiAgICBsZXQgeyBrZXlGb3IgfSA9IHRoaXM7XG5cbiAgICBsZXQga2V5ID0ga2V5Rm9yKHZhbHVlIGFzIERpY3QsIHRoaXMucG9zKTtcbiAgICBsZXQgbWVtbyA9IHRoaXMucG9zO1xuXG4gICAgcmV0dXJuIHsga2V5LCB2YWx1ZSwgbWVtbyB9O1xuICB9XG59XG4iXSwic291cmNlUm9vdCI6IiJ9
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3BhY2thZ2VzL0BnbGltbWVyL3JlZmVyZW5jZS9saWIvaXRlcmFibGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7OztBQUFBLFNBQUEsT0FBQSxFQUFBL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cm4geyBrZXksIHZhbHVlLCBtZW1vIH07XG4gIH1cbn1cbiJdLCJzb3VyY2VSb290IjoiIn0=
{
"name": "@glimmer/reference",
"version": "0.76.0",
"version": "0.77.0",
"description": "Objects used to track values and their dirtiness in Glimmer",

@@ -8,6 +8,6 @@ "license": "MIT",

"@glimmer/env": "^0.1.7",
"@glimmer/global-context": "0.76.0",
"@glimmer/interfaces": "0.76.0",
"@glimmer/util": "0.76.0",
"@glimmer/validator": "0.76.0"
"@glimmer/global-context": "0.77.0",
"@glimmer/interfaces": "0.77.0",
"@glimmer/util": "0.77.0",
"@glimmer/validator": "0.77.0"
},

@@ -14,0 +14,0 @@ "main": "dist/commonjs/es2017/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