Comparing version 0.0.0 to 1.0.0
{ | ||
"name": "oneline", | ||
"version": "0.0.0", | ||
"description": "A repository/library to aid in the discovery and reuse of very small pieces of code - oneliners", | ||
"main": "index.js", | ||
"version": "1.0.0", | ||
"description": "Write nice template literals with newlines, but format as a single-line string", | ||
"main": "oneline.js", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
"test": "node test.js" | ||
}, | ||
"engines": { | ||
"node" : ">=6.0.0" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+ssh://git@github.com/halhenke/oneline.git" | ||
"url": "git+ssh://git@github.com/rexxars/oneline.git" | ||
}, | ||
"files": [ | ||
"oneline.js", | ||
"test.js" | ||
], | ||
"keywords": [ | ||
"modular", | ||
"oneline" | ||
"template-literal", | ||
"template-string", | ||
"tagged", | ||
"string", | ||
"multiline" | ||
], | ||
"publishConfig": { | ||
"tag": "next" | ||
}, | ||
"author": "Hal Henke", | ||
"license": "ISC", | ||
"author": "Espen Hovlandsdal <espen@hovlandsdal.com>", | ||
"license": "MIT", | ||
"bugs": { | ||
"url": "https://github.com/halhenke/oneline/issues" | ||
"url": "https://github.com/rexxars/oneline/issues" | ||
}, | ||
"homepage": "https://github.com/halhenke/oneline#readme" | ||
"homepage": "https://github.com/rexxars/oneline#readme" | ||
} |
@@ -1,11 +0,33 @@ | ||
# What is this? | ||
# oneline | ||
Inspired by discussion debate around "extreme modularity" and the creation/use of packages that might consist of only a single line of code. See [here](https://github.com/sindresorhus/ama/issues/10) | ||
Write nice template literals with newlines, but format as a single-line string. | ||
Trims leading/trailing whitespace and replaces all newlines and subsequent whitespace with a single space. | ||
Basically the idea is that by bundling these micro-packages into a lodash style utility library they will be more discoverable to package consumers i.e. you might not even think to look for a module that checks if a number is `-0` on npm but if you know theres a library that might contain such code you'd be more likely to check there. And over time you might have more of an idea of what already already exists. All modules will be available as individual npm packages, again a la lodash. | ||
[![npm version](https://img.shields.io/npm/v/oneline.svg?style=flat-square)](http://browsenpm.org/package/oneline)[![Build Status](https://img.shields.io/travis/rexxars/oneline/master.svg?style=flat-square)](https://travis-ci.org/rexxars/oneline) | ||
I'm not sure if this type of programming will be particularly useful or will lead to the downfall of modern civilization but hopefully a library like this might mitigate some of the potential downsides of this type of fine grained modularity while maintaining the theoretical advantages. | ||
## Installing | ||
# Placeholder for now | ||
``` | ||
npm install --save oneline | ||
``` | ||
Because I only thought of this half an hour ago... | ||
## Basic usage | ||
```js | ||
const oneline = require('oneline') | ||
const url = 'https://docs.npmjs.com/' | ||
const message = oneline` | ||
It's a fine day to write a long, verbose string. | ||
It could contain all sorts of expressions, let's for instance | ||
inject a URL, say to the NPM docs: ${url}. In the end, this will | ||
all result in a single line of text. | ||
` | ||
console.log(message) | ||
// It's a fine day to write a long, verbose string. It could contain all sorts of expressions, let's for instance inject a URL, say to the NPM docs: https://docs.npmjs.com/. In the end, this will all result in a single line of text. | ||
``` | ||
## License | ||
MIT © [Espen Hovlandsdal](https://espen.codes/) |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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
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 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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
4266
5
22
0
34