Socket
Socket
Sign inDemoInstall

101

Package Overview
Dependencies
Maintainers
1
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

101 - npm Package Compare versions

Comparing version 0.14.1 to 0.16.1

flip.js

2

curry.js

@@ -27,3 +27,3 @@ /**

if (curryArgs.length >= n) {
return f.apply(null, curryArgs);
return f.apply(null, curryArgs.slice(0, n));
} else {

@@ -30,0 +30,0 @@ return _curry(f, n, curryArgs);

/**
* @module 101/is-number
*
*/

@@ -16,2 +15,2 @@

return typeof val === 'number' || val instanceof Number;
}
}
/**
* @module 101/is-string
*
*/

@@ -16,2 +15,2 @@

return typeof val === 'string' || val instanceof String;
}
}
{
"name": "101",
"version": "0.14.1",
"version": "0.16.1",
"description": "common javascript utils that can be required selectively that assume es5+",

@@ -33,4 +33,4 @@ "main": "index.js",

"devDependencies": {
"coveralls": "^2.11.2",
"lab": "^4.6.2"
"code": "^1.4.0",
"lab": "^5.5.1"
},

@@ -37,0 +37,0 @@ "dependencies": {

@@ -258,2 +258,24 @@ ![101](http://i.imgur.com/MFrmMt6.png)

## flip
Returns a function with flipped arguments
```js
var flip = require('101/flip');
var curry = require('101/curry');
var hasKeypaths = require('101/has-keypaths');
var hasFooBar = curry(flip(hasKeypaths))(['foo.bar']);
hasFooBar({ foo: { bar : true } }); // true
function prefix(pre, str) {
return pre + str;
}
flip(prefix)('hello', '_'); // "_hello"
```
## hasKeypaths

@@ -417,2 +439,30 @@

## lens
Create a lens to access a datastructur.
```js
var fooLens = lens('foo');
var toUpper = function(str) { return str.toUpperCase(); };
var obj = {
foo: 'foo',
bar: 'bar'
};
var arr = ['foo', 'bar'];
fooLens(obj); // => 'foo'
fooLens.set('moo', obj); // => { foo: 'moo', bar: 'bar' }
fooLens.mod(toUpper, obj); // => { foo: 'MOO', bar: 'bar' }
var first = lens(
function(arr) { return arr[0]; },
function(val, arr) { var clone = arr.slice(); clone[0] = val; return clone; }
);
first(arr); // => 'foo'
first.set('moo')(arr); // => ['moo', 'bar']
first.mod(toUpper)(arr); // => ['FOO', 'bar']
```
## noop

@@ -589,2 +639,17 @@

## values
Returns Array containing the values of the properties of an object
```js
var values = require('101/values');
var obj {
foo: 'apple',
bar: 'orange'
};
var objValues = values(obj);
objValues // ['apple', 'orange']
```
## xor

@@ -591,0 +656,0 @@

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