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

ref

Package Overview
Dependencies
Maintainers
1
Versions
48
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ref - npm Package Compare versions

Comparing version 1.3.3 to 1.3.4

7

CHANGELOG.md

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

1.3.4 / 2017-01-27
==================
* [[`32637be7e4`](https://github.com/TooTallNate/ref/commit/32637be7e4)] - CI stuffs (Nathan Rajlich)
* [[`55716fd9e3`](https://github.com/TooTallNate/ref/commit/55716fd9e3)] - always use `defineProperty()` for `name` (Nathan Rajlich)
* [[`786b73941e`](https://github.com/TooTallNate/ref/commit/786b73941e)] - **refType**: force name to writable before updating it (Joel Martin) (#67)
1.3.3 / 2016-11-03

@@ -2,0 +9,0 @@ ==================

7

lib/ref.js

@@ -309,3 +309,8 @@

if (_type.name) {
rtn.name = _type.name + '*'
Object.defineProperty(rtn, 'name', {
value: _type.name + '*',
configurable: true,
enumerable: true,
writable: true
})
}

@@ -312,0 +317,0 @@ return rtn

4

package.json

@@ -20,3 +20,3 @@ {

],
"version": "1.3.3",
"version": "1.3.4",
"license": "MIT",

@@ -31,3 +31,3 @@ "author": "Nathan Rajlich <nathan@tootallnate.net> (http://tootallnate.net)",

"docs": "node docs/compile",
"test": "mocha -gc --reporter spec"
"test": "mocha -gc --reporter spec --use_strict"
},

@@ -34,0 +34,0 @@ "dependencies": {

@@ -22,2 +22,24 @@

it('should override and update a read-only name property', function () {
// a type similar to ref-struct's StructType
// used for types refType name property test
function StructType() {}
StructType.size = 0
StructType.indirection = 0
// read-only name property
assert.equal(StructType.name, 'StructType')
try {
StructType.name = 'foo'
} catch (err) {
// ignore
}
assert.equal(StructType.name, 'StructType')
// name property should be writable and updated
var newObj = ref.refType(StructType)
var newProp = Object.getOwnPropertyDescriptor(newObj, 'name')
assert.equal(newProp.writable, true)
assert.equal(newObj.name, 'StructType*')
})
})

@@ -24,0 +46,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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