Comparing version 1.0.0 to 1.1.0
22
List.js
@@ -25,2 +25,12 @@ function* concat(iterables) { | ||
} | ||
function* skip(count, source) { | ||
let skipped = 0; | ||
for (const value of source) { | ||
if (skipped < count) { | ||
skipped++; | ||
continue; | ||
} | ||
yield value; | ||
} | ||
} | ||
function* map(project, source) { | ||
@@ -57,5 +67,17 @@ for (const value of source) { | ||
} | ||
head() { | ||
for (const value of this.iterable) { | ||
return value; | ||
} | ||
return undefined; | ||
} | ||
tail() { | ||
return this.skip(1); | ||
} | ||
take(count) { | ||
return new List(take(count, this.iterable)); | ||
} | ||
skip(count) { | ||
return new List(skip(count, this.iterable)); | ||
} | ||
map(project) { | ||
@@ -62,0 +84,0 @@ return new List(map(project, this.iterable)); |
{ | ||
"name": "nebelsbad", | ||
"version": "1.0.0", | ||
"version": "1.1.0", | ||
"main": "index.js", | ||
"license": "MIT", | ||
"scripts": { | ||
"build": "rm -rf dist && tsc && cp -rf package.json dist", | ||
"build": "rm -rf dist && tsc && cp -rf package.json dist && cp -rf README.md dist", | ||
"test": "jest" | ||
@@ -9,0 +9,0 @@ }, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
1
4
2316
3
90