Hello community,

here is the log from the commit of package nodejs-caseless for openSUSE:Factory 
checked in at 2015-06-30 10:17:05
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/nodejs-caseless (Old)
 and      /work/SRC/openSUSE:Factory/.nodejs-caseless.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "nodejs-caseless"

Changes:
--------
--- /work/SRC/openSUSE:Factory/nodejs-caseless/nodejs-caseless.changes  
2015-04-27 13:00:15.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.nodejs-caseless.new/nodejs-caseless.changes     
2015-06-30 10:17:06.000000000 +0200
@@ -1,0 +2,5 @@
+Fri Jun 26 17:37:25 UTC 2015 - i...@marguerite.su
+
+- update version 0.10.0
+
+-------------------------------------------------------------------

Old:
----
  caseless-0.6.0.tgz

New:
----
  caseless-0.10.0.tgz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ nodejs-caseless.spec ++++++
--- /var/tmp/diff_new_pack.39Okbx/_old  2015-06-30 10:17:07.000000000 +0200
+++ /var/tmp/diff_new_pack.39Okbx/_new  2015-06-30 10:17:07.000000000 +0200
@@ -19,7 +19,7 @@
 %define base_name caseless
 
 Name:           nodejs-caseless
-Version:        0.6.0
+Version:        0.10.0
 Release:        0
 Summary:        Caseless object set/get/has
 License:        BSD-2-Clause

++++++ caseless-0.6.0.tgz -> caseless-0.10.0.tgz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/package/README.md new/package/README.md
--- old/package/README.md       2014-03-19 01:24:53.000000000 +0100
+++ new/package/README.md       2015-01-12 14:13:34.000000000 +0100
@@ -1,6 +1,6 @@
 ## Caseless -- wrap an object to set and get property with caseless semantics 
but also preserve caseing.
 
-This library is incredibly useful when working with HTTP headers. It allows 
you to get/set/check for headers in a caseless manor while also preserving the 
caseing of headers the first time they are set.
+This library is incredibly useful when working with HTTP headers. It allows 
you to get/set/check for headers in a caseless manner while also preserving the 
caseing of headers the first time they are set.
 
 ## Usage
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/package/index.js new/package/index.js
--- old/package/index.js        2014-08-12 00:11:57.000000000 +0200
+++ new/package/index.js        2015-01-12 14:13:34.000000000 +0100
@@ -1,5 +1,5 @@
 function Caseless (dict) {
-  this.dict = dict
+  this.dict = dict || {}
 }
 Caseless.prototype.set = function (name, value, clobber) {
   if (typeof name === 'object') {
@@ -25,12 +25,12 @@
   return false
 }
 Caseless.prototype.get = function (name) {
-  var result, re, match
+  name = name.toLowerCase()
+  var result, _key
   var headers = this.dict
   Object.keys(headers).forEach(function (key) {
-    re = new RegExp(name, 'i')
-    match = key.match(re)
-    if (match) result = headers[key]
+    _key = key.toLowerCase()
+    if (name === _key) result = headers[key]
   })
   return result
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/package/package.json new/package/package.json
--- old/package/package.json    2014-08-12 00:12:27.000000000 +0200
+++ new/package/package.json    2015-03-13 17:44:28.000000000 +0100
@@ -1,6 +1,6 @@
 {
   "name": "caseless",
-  "version": "0.6.0",
+  "version": "0.10.0",
   "description": "Caseless object set/get/has, very useful when working with 
HTTP headers.",
   "main": "index.js",
   "scripts": {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/package/test.js new/package/test.js
--- old/package/test.js 2014-07-24 04:21:17.000000000 +0200
+++ new/package/test.js 2015-01-12 14:13:34.000000000 +0100
@@ -6,7 +6,7 @@
   var headers = {}
     , c = caseless(headers)
     ;
-  t.plan(14)
+  t.plan(17)
   c.set('a-Header', 'asdf')
   t.equal(c.get('a-header'), 'asdf')
   t.equal(c.has('a-header'), 'a-Header')
@@ -30,4 +30,11 @@
   t.notOk(c.has('idonotexist'))
   t.ok(c.del('idonotexist'))
 
+  c.set('tva', 'test1')
+  c.set('tva-header', 'test2')
+  t.equal(c.has('tva'), 'tva')
+  t.notOk(c.has('header'))
+
+  t.equal(c.get('tva'), 'test1')
+
 })


Reply via email to