New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

uncouple

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

uncouple - npm Package Compare versions

Comparing version 0.1.0 to 0.2.0

.travis.yml

5

CHANGELOG.md

@@ -0,2 +1,7 @@

# 0.2.0 - [22-01-2017]
- Added polyfills for `Object.assign`, `Object.entries` & `Object.getOwnPropertyDescriptors`;
- Added CI;
- Fixed LICENSE;
# 0.1.0 - [21-01-2017]
- :boom: Created `uncouple` module;

20

dist/uncouple.cjs.js
/*!
* uncouple v0.1.0
* (c) 2018-present Vitor Cavalcanti
* uncouple v0.2.0
* (c) 2018-present Vitor Cavalcanti <vitorluizc@outlook.com> (https://vitorluizc.github.io)
* Released under the MIT License.

@@ -8,2 +8,8 @@ */

function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
var entries = _interopDefault(require('object.entries'));
var assign = _interopDefault(require('object.assign'));
var getOwnPropertyDescriptors = _interopDefault(require('object.getownpropertydescriptors'));
var map = Function.call.bind(Array.prototype.map);

@@ -15,6 +21,2 @@

var entries = Object.entries;
var getOwnPropertyDescriptors = Object.getOwnPropertyDescriptors;
var obj;

@@ -25,3 +27,4 @@ var toProperty = function (ref) {

return Object.assign({ name: name }, descriptor);
var property = assign({}, descriptor, { name: name });
return property;
};

@@ -41,3 +44,4 @@

return Object.assign({}, object, ( obj = {}, obj[name] = Function.call.bind(value), obj));
var result = assign({}, object, ( obj = {}, obj[name] = Function.call.bind(value), obj));
return result;
};

@@ -44,0 +48,0 @@

18

dist/uncouple.m.js
/*!
* uncouple v0.1.0
* (c) 2018-present Vitor Cavalcanti
* uncouple v0.2.0
* (c) 2018-present Vitor Cavalcanti <vitorluizc@outlook.com> (https://vitorluizc.github.io)
* Released under the MIT License.
*/
import entries from 'object.entries';
import assign from 'object.assign';
import getOwnPropertyDescriptors from 'object.getownpropertydescriptors';
var map = Function.call.bind(Array.prototype.map);

@@ -12,6 +16,2 @@

var entries = Object.entries;
var getOwnPropertyDescriptors = Object.getOwnPropertyDescriptors;
var obj;

@@ -22,3 +22,4 @@ var toProperty = function (ref) {

return Object.assign({ name: name }, descriptor);
var property = assign({}, descriptor, { name: name });
return property;
};

@@ -38,3 +39,4 @@

return Object.assign({}, object, ( obj = {}, obj[name] = Function.call.bind(value), obj));
var result = assign({}, object, ( obj = {}, obj[name] = Function.call.bind(value), obj));
return result;
};

@@ -41,0 +43,0 @@

{
"name": "uncouple",
"version": "0.1.0",
"description": "Uncople object properties and methods.",
"version": "0.2.0",
"description": "Uncouple prototype methods.",
"main": "dist/uncouple.cjs.js",

@@ -17,5 +17,13 @@ "module": "dist/uncouple.m.js",

"keywords": [
"uncouple"
"uncouple",
"prototype",
"duck-typing",
"functional",
"functional-programming"
],
"author": "Vitor Cavalcanti",
"author": {
"url": "https://vitorluizc.github.io/",
"name": "Vitor Cavalcanti",
"email": "vitorluizc@outlook.com"
},
"license": "MIT",

@@ -29,3 +37,8 @@ "bugs": {

"bili": "^1.6.5"
},
"dependencies": {
"object.assign": "^4.1.0",
"object.entries": "^1.0.4",
"object.getownpropertydescriptors": "^2.0.3"
}
}
# Uncouple
[![Build Status][ci-status-badge]][ci-status]
Uncouple prototype methods.

@@ -34,1 +36,3 @@

[license]: ./LICENSE
[ci-status]: https://travis-ci.org/VitorLuizC/uncouple
[ci-status-badge]: https://travis-ci.org/VitorLuizC/uncouple.svg?branch=master
import { map, filter, reduce } from './collection';
import { entries, getOwnPropertyDescriptors } from './object';
import { assign, entries, getOwnPropertyDescriptors } from './object';
const toProperty = ([ name, descriptor ]) => ({ name, ...descriptor });
const toProperty = ([ name, descriptor ]) => {
const property = assign({}, descriptor, { name });
return property;
};

@@ -18,6 +21,6 @@ const getProperties = (object) => {

const withMethod = (object, { name, value }) => ({
...object,
[name]: Function.call.bind(value)
});
const withMethod = (object, { name, value }) => {
const result = assign({}, object, { [name]: Function.call.bind(value) });
return result;
};

@@ -24,0 +27,0 @@ const uncouple = (object) => {

@@ -1,3 +0,5 @@

export const entries = Object.entries;
export { default as entries } from 'object.entries';
export const getOwnPropertyDescriptors = Object.getOwnPropertyDescriptors;
export { default as assign } from 'object.assign';
export { default as getOwnPropertyDescriptors } from 'object.getownpropertydescriptors';

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc