فهرست منبع

Removed trivial functions.

Eugene Lazutkin 3 سال پیش
والد
کامیت
1c2fbd6ba2
2فایلهای تغییر یافته به همراه0 افزوده شده و 14 حذف شده
  1. 0 7
      src/jsonl/parser.js
  2. 0 7
      src/jsonl/stringer.js

+ 0 - 7
src/jsonl/parser.js

@@ -5,8 +5,6 @@ const asStream = require('../asStream');
 const fixUtf8Stream = require('../utils/fixUtf8Stream');
 const lines = require('../utils/lines');
 
-const parse = reviver => string => JSON.parse(string, reviver);
-
 const parser = options => {
   const reviver = options && options.reviver;
   let counter = 0;
@@ -16,9 +14,4 @@ const parser = options => {
   );
 };
 
-parser.parse = parse;
-
 module.exports = parser;
-
-// to keep ESM happy
-module.exports.parse = parse;

+ 0 - 7
src/jsonl/stringer.js

@@ -2,8 +2,6 @@
 
 const {Transform} = require('stream');
 
-const stringify = (replacer, space) => value => JSON.stringify(value, replacer, space);
-
 const stringer = options => {
   let first = true,
     prefix = '',
@@ -47,9 +45,4 @@ const stringer = options => {
   );
 };
 
-stringer.stringify = stringify;
-
 module.exports = stringer;
-
-// to keep ESM happy
-module.exports.stringify = stringify;