From 25e5ceb884026aee5eff43571d852d5533287568 Mon Sep 17 00:00:00 2001 From: kkujala Date: Sun, 13 Nov 2011 03:56:06 -0800 Subject: [PATCH] In #791 the consesus was that how to create classes should be on wiki. --- Style-Guide.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 Style-Guide.md diff --git a/Style-Guide.md b/Style-Guide.md new file mode 100644 index 0000000..2ae5661 --- /dev/null +++ b/Style-Guide.md @@ -0,0 +1,16 @@ +# Style Guide +## Classes +The standard way of creating classes in pdf.js is the following. Please note that by class we mean an object that is class-like. +
+var Name = (function NameConstructor() {
+  function Name(name) {
+    this.name = name;
+  }
+
+  Name.prototype = {
+  };
+  ...
+
+  return Name;
+})();
+
\ No newline at end of file