Permalink
Browse files

Configurable, enumerable, and writable are all now false by default.

  • Loading branch information...
eligrey committed Jun 20, 2010
1 parent 07fb6af commit bef28bb79851e1b6f71288fa7a5c4875bf6e955a
Showing with 8 additions and 9 deletions.
  1. +2 −2 COPYING.md
  2. +6 −7 xccessors-standard.js
View
@@ -3,7 +3,7 @@ This program is dual-licensed under the GNU GPL v3 and the X11/MIT license.
X11/MIT license
---------------
-Copyright (c) 2009 Elijah Grey
+Copyright © 2009 Elijah Grey
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
@@ -29,7 +29,7 @@ OTHER DEALINGS IN THE SOFTWARE.
GNU GPL v3 license
------------------
-Copyright (c) 2009 Elijah Grey
+Copyright © Elijah Grey
This software is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
View
@@ -1,10 +1,10 @@
/*
* Xccessors Standard: Cross-browser ECMAScript 5 accessors
- * http://github.com/eligrey/Xccessors
+ * http://purl.eligrey.com/github/Xccessors
*
- * 2010-03-21
+ * 2010-06-20
*
- * By Elijah Grey, http://eligrey.com
+ * By Eli Grey, http://eligrey.com
*
* A shim that partially implements Object.defineProperty,
* Object.getOwnPropertyDescriptor, and Object.defineProperties in browsers that have
@@ -55,12 +55,11 @@
// can't switch off these features in ECMAScript 3
// so throw a TypeError if any are false
- if (descriptor.writable === False || descriptor.enumerable === False ||
- descriptor.configurable === False)
+ if (!(descriptor.writable || descriptor.enumerable || descriptor.configurable))
{
throw new TypeError(
"This implementation of Object.defineProperty does not support" +
- "false for configurable, enumerable, or writable."
+ " false for configurable, enumerable, or writable."
);
}
@@ -78,7 +77,7 @@
if (!Object.getOwnPropertyDescriptor) {
Object.getOwnPropertyDescriptor = function (obj, prop) {
if (arguments.length < 2) { // all arguments required
- throw new TypeError("Arguments not optional");
+ throw new TypeError("Arguments not optional.");
}
prop += ""; // convert prop to string

0 comments on commit bef28bb

Please sign in to comment.