Comparing version 0.0.0 to 0.0.1-security
{ | ||
"name": "andthen", | ||
"version": "0.0.0", | ||
"description": "Async function composition with parameter fixing abiliy.", | ||
"version": "0.0.1-security", | ||
"description": "", | ||
"main": "index.js", | ||
"scripts": { | ||
"test": "mocha" | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
}, | ||
"devDependencies": { | ||
"fox": "*" | ||
}, | ||
"repository": { | ||
"url": "git@github.com:azer\/andthen.git", | ||
"type": "git" | ||
"type": "git", | ||
"url": "git+https://github.com/npm/security-holder.git" | ||
}, | ||
"author": "azer", | ||
"license": "BSD" | ||
} | ||
"keywords": [], | ||
"author": "", | ||
"license": "ISC", | ||
"bugs": { | ||
"url": "https://github.com/npm/security-holder/issues" | ||
}, | ||
"homepage": "https://github.com/npm/security-holder#readme" | ||
} |
102
README.md
@@ -1,97 +0,9 @@ | ||
## andthen | ||
# Security holding package | ||
Async function composition with parameter fixing abiliy. | ||
This package name is not currently in use, but was formerly occupied | ||
by a popular package. To avoid malicious use, npm is hanging on to | ||
the package name, but loosely, and we'll probably give it to you if | ||
you want it. | ||
```bash | ||
$ npm install andthen | ||
``` | ||
See Also: [comp](http://github.com/azer/comp) | ||
### Usage | ||
Functions almost same as other function composition libraries, except that it lets you bind a property of a produced value to following function. | ||
Simplest usage could look like: | ||
```js | ||
andThen = require('andThen') | ||
andThen(getContent, 'posts', getPosts, 'images', getImages)(function(error, contents){ | ||
contents.posts | ||
// => ['Foo', 'bar', 'qux'] | ||
contents.images | ||
// => ['11.jpg', '7.jpg', '3.jpg'] | ||
}) | ||
function getContents(callback){ | ||
callback(undefined, { posts: [3, 1, 4], images: [11, 7, 3]) | ||
} | ||
function getPosts(ids, callback){ | ||
callback(undefined, ['Foo', 'bar', 'qux']) | ||
} | ||
function getImages(ids, callback){ | ||
callback(undefined, ['11.jpg', '7.jpg', '3.jpg']) | ||
} | ||
``` | ||
More detailed example with full functional programming armory: | ||
```js | ||
andThen = require('andThen') | ||
map = require('map') | ||
partial = require('new-partial') | ||
getPosts = partial(map, getPost) | ||
getPhotos = partial(map, getPhoto) | ||
getProfile = andThen(getUser, 'posts', getPosts, 'photos', getPhotos) | ||
getProfile(1, function(error, profile){ | ||
profile.posts[0].title, profile.posts[2].content | ||
// => Post #1, Content #5 | ||
profile.photos[0].path, profile.photos[1].path | ||
// => /photos/2.jpg, /photos/7.jpg | ||
}) | ||
function getUser(id, callback){ | ||
callback(undefined, { | ||
name : 'Smith', | ||
posts : [1, 3, 5], | ||
photos : [2, 7, 11] | ||
}) | ||
} | ||
function getPost(id, callback){ | ||
callback(undefined, { | ||
title: 'Post #' + id, | ||
content: 'Content #' + id | ||
}) | ||
} | ||
function getPhoto(id, callback){ | ||
callback(undefined, { | ||
path: '/photos' + id + '.jpg | ||
}) | ||
} | ||
``` | ||
![](http://distilleryimage2.s3.amazonaws.com/3e14d1ae8e4711e2af7822000a1fb04e_6.jpg) | ||
You may adopt this package by contacting support@npmjs.com and | ||
requesting the name. |
Known malware
Supply chain riskThis package is malware. We have asked the package registry to remove it.
Found 1 instance in 1 package
Empty package
Supply chain riskPackage does not contain any code. It may be removed, is name squatting, or the result of a faulty package publish.
Found 1 instance in 1 package
No contributors or author data
MaintenancePackage does not specify a list of contributors or an author in package.json.
Found 1 instance in 1 package
No tests
QualityPackage does not have any tests. This is a strong signal of a poorly maintained or low quality package.
Found 1 instance in 1 package
Misc. License Issues
License(Experimental) A package's licensing information has fine-grained problems.
Found 1 instance in 1 package
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
0
0
800
2
0
10
1
1