[Pkg-javascript-commits] [node-lazy-property] 01/03: New upstream version 1.0.0

Saravanan Palanisamy saravanan30erd-guest at moszumanska.debian.org
Fri Jul 14 16:33:46 UTC 2017


This is an automated email from the git hooks/post-receive script.

saravanan30erd-guest pushed a commit to branch master
in repository node-lazy-property.

commit 8144d48c0c4a809953a3afdd0d73c9f3b2ffa4c7
Author: saravanan30erd <saravanan30erd at gmail.com>
Date:   Fri Jul 14 12:11:11 2017 -0400

    New upstream version 1.0.0
---
 .gitignore     | 15 +++++++++++++++
 component.json |  7 -------
 test/test.js   | 20 ++++++++++++++++++++
 3 files changed, 35 insertions(+), 7 deletions(-)

diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..0d1b0b0
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,15 @@
+lib-cov
+*.seed
+*.log
+*.csv
+*.dat
+*.out
+*.pid
+*.gz
+
+pids
+logs
+results
+
+npm-debug.log
+node_modules/*
\ No newline at end of file
diff --git a/component.json b/component.json
deleted file mode 100644
index 142938e..0000000
--- a/component.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
-  "name": "lazy-property",
-  "version": "0.0.2",
-  "description": "Lazily initialized properties for objects",
-  "main": "lazyProperty.js",
-  "scripts": ["lazyProperty.js"]
-}
diff --git a/test/test.js b/test/test.js
new file mode 100644
index 0000000..4950ad2
--- /dev/null
+++ b/test/test.js
@@ -0,0 +1,20 @@
+var tape = require("tape")
+var addLazyProperty = require("../lazyProperty.js")
+
+tape("lazy-property", function(t) {
+  var obj = {}
+  var count = 0
+
+  addLazyProperty(obj, "foo", function() {
+    ++count
+    return "bar"
+  })
+  
+  t.same(count, 0)
+  t.same(obj.foo, "bar")
+  t.same(count, 1)
+  t.same(obj.foo, "bar")
+  t.same(count, 1)
+  
+  t.end()
+})
\ No newline at end of file

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-lazy-property.git



More information about the Pkg-javascript-commits mailing list