// namespace a value and assign to a given object.
// convenience function. I tend to do this often.
// enhance as necessary.

function nsp (obj, key, val) {
  if (!key && !val) return obj
  if (arguments.length === 2 && val == null) {
    val = key
    key = obj
    obj = {}
  }

  obj[key] = val
  return obj
}

module.exports = nsp

@@ -98,32 +98,142 @@
 en.%0A
+%0A
 // 
-enhance as necessary.
+set a top-level (flatten) object property%0A// differs from %60set%60 in that %60obj%60 is optional and does%0A// not create nested properties
 %0A%0Afu
@@ -296,40 +296,14 @@
 obj%0A
+
   if (
-arguments.length === 2 && 
 val 

update object/nsp.js