Comparing version 8.0.0 to 9.0.0
@@ -1,3 +0,1 @@ | ||
/// <reference types="node"/> | ||
declare const getStdin: { | ||
@@ -12,8 +10,6 @@ /** | ||
// example.ts | ||
import getStdin = require('get-stdin'); | ||
import getStdin from 'get-stdin'; | ||
(async () => { | ||
console.log(await getStdin()); | ||
//=> 'unicorns' | ||
}) | ||
console.log(await getStdin()); | ||
//=> 'unicorns' | ||
@@ -34,2 +30,2 @@ // $ echo unicorns | ts-node example.ts | ||
export = getStdin; | ||
export default getStdin; |
@@ -1,5 +0,4 @@ | ||
'use strict'; | ||
const {stdin} = process; | ||
module.exports = async () => { | ||
export default async function getStdin() { | ||
let result = ''; | ||
@@ -18,5 +17,5 @@ | ||
return result; | ||
}; | ||
} | ||
module.exports.buffer = async () => { | ||
getStdin.buffer = async () => { | ||
const result = []; | ||
@@ -23,0 +22,0 @@ let length = 0; |
{ | ||
"name": "get-stdin", | ||
"version": "8.0.0", | ||
"version": "9.0.0", | ||
"description": "Get stdin as a string or buffer", | ||
@@ -13,4 +13,6 @@ "license": "MIT", | ||
}, | ||
"type": "module", | ||
"exports": "./index.js", | ||
"engines": { | ||
"node": ">=10" | ||
"node": ">=12" | ||
}, | ||
@@ -35,8 +37,8 @@ "scripts": { | ||
"devDependencies": { | ||
"@types/node": "^13.13.5", | ||
"ava": "^2.4.0", | ||
"delay": "^4.2.0", | ||
"tsd": "^0.11.0", | ||
"xo": "^0.24.0" | ||
"@types/node": "^14.14.41", | ||
"ava": "^3.15.0", | ||
"delay": "^5.0.0", | ||
"tsd": "^0.14.0", | ||
"xo": "^0.38.2" | ||
} | ||
} |
@@ -1,2 +0,2 @@ | ||
# get-stdin [![Build Status](https://travis-ci.com/sindresorhus/get-stdin.svg?branch=master)](https://travis-ci.com/sindresorhus/get-stdin) | ||
# get-stdin | ||
@@ -15,8 +15,6 @@ > Get [stdin](https://nodejs.org/api/process.html#process_process_stdin) as a string or buffer | ||
// example.js | ||
const getStdin = require('get-stdin'); | ||
import getStdin from 'get-stdin'; | ||
(async () => { | ||
console.log(await getStdin()); | ||
//=> 'unicorns' | ||
})(); | ||
console.log(await getStdin()); | ||
//=> 'unicorns' | ||
``` | ||
@@ -23,0 +21,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
Yes
4535
46
57