Socket
Socket
Sign inDemoInstall

oolong

Package Overview
Dependencies
0
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.8.0 to 1.9.0

test/oolong/wrap_test.js

5

CHANGELOG.md

@@ -0,1 +1,6 @@

## 1.9.0 (Jun 1, 2015)
- Adds [`Oolong.wrap`][wrap].
[wrap]: https://github.com/moll/js-oolong/blob/master/doc/API.md#Oolong.wrap
## 1.8.0 (May 29, 2015)

@@ -2,0 +7,0 @@ - Adds [`Oolong.defineGetter`][defineGetter].

@@ -30,2 +30,3 @@ Oolong.js API Documentation

- [values](#Oolong.values)(object)
- [wrap](#Oolong.wrap)(value, key)

@@ -372,1 +373,11 @@

```
<a name="Oolong.wrap" />
### Oolong.wrap(value, key)
Wraps a given value in an object under the specified key.
Works also with [ECMAScript 6 Symbol](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Symbol).
**Examples**:
```javascript
Oolong.wrap("John", "name") // => {name: "John"}
```

@@ -551,2 +551,20 @@ var hasOwn = Function.call.bind(Object.hasOwnProperty)

/**
* Wraps a given value in an object under the specified key.
* Works also with [ECMAScript 6 Symbol](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Symbol).
*
* @example
* Oolong.wrap("John", "name") // => {name: "John"}
*
* @static
* @method wrap
* @param value
* @param key
*/
exports.wrap = function(value, key) {
var obj = {}
obj[key] = value
return obj
}
function not(fn) { return function() { return !fn.apply(this, arguments) }}

2

package.json
{
"name": "oolong",
"version": "1.8.0",
"version": "1.9.0",
"description": "Utilities for objects. Simple, tasteful and plentiful. Supports inherited properties.",

@@ -5,0 +5,0 @@ "keywords": [

@@ -67,2 +67,3 @@ Oolong.js

- [values](https://github.com/moll/js-oolong/blob/master/doc/API.md#Oolong.values)(object)
- [wrap](https://github.com/moll/js-oolong/blob/master/doc/API.md#Oolong.wrap)(value, key)

@@ -69,0 +70,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc