Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@softwareventures/csv

Package Overview
Dependencies
Maintainers
1
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@softwareventures/csv - npm Package Compare versions

Comparing version 1.0.3 to 2.0.0

.eslintignore

2

index.d.ts

@@ -1,2 +0,2 @@

import { ReadonlyTable } from "@softwareventures/table";
import type { ReadonlyTable } from "@softwareventures/table";
export interface Configuration {

@@ -3,0 +3,0 @@ readonly separator?: string;

@@ -63,5 +63,7 @@ "use strict";

function parse(data, configuration) {
const separator = configuration && configuration.separator || defaultSeparator;
const quote = configuration && configuration.quote || defaultQuote;
const resultState = String(data).split("")
var _a, _b;
const separator = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.separator) !== null && _a !== void 0 ? _a : defaultSeparator;
const quote = (_b = configuration === null || configuration === void 0 ? void 0 : configuration.quote) !== null && _b !== void 0 ? _b : defaultQuote;
const resultState = String(data)
.split("")
.reduce((data, char) => {

@@ -105,10 +107,9 @@ if (data.state === "after-comma" && char === " ") {

function write(table, configuration) {
const separator = configuration && configuration.separator || defaultSeparator;
const quote = configuration && configuration.quote || defaultQuote;
const quoteRegex = new RegExp(regexEscape(quote), "g");
return (0, array_1.map)(table, row => (0, array_1.map)(row, field => quote + field.replace(quoteRegex, quote + quote) + quote)
.join(separator))
.join("\r\n");
var _a, _b;
const separator = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.separator) !== null && _a !== void 0 ? _a : defaultSeparator;
const quote = (_b = configuration === null || configuration === void 0 ? void 0 : configuration.quote) !== null && _b !== void 0 ? _b : defaultQuote;
const quoteRegex = new RegExp(regexEscape(quote), "gu");
return (0, array_1.map)(table, row => (0, array_1.map)(row, field => quote + field.replace(quoteRegex, quote + quote) + quote).join(separator)).join("\r\n");
}
exports.write = write;
//# sourceMappingURL=index.js.map
Copyright 2018-2022 Software Ventures Limited.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
Permission to use, copy, modify, and/or distribute this software for any purpose
with or without fee is hereby granted, provided that the above copyright notice
and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
THIS SOFTWARE.
{
"name": "@softwareventures/csv",
"version": "1.0.3",
"version": "2.0.0",
"description": "Parser and serializer for CSV and related formats",

@@ -18,5 +18,5 @@ "keywords": [

"scripts": {
"fix": "tsc --noEmit && tslint --fix --project .",
"lint": "tsc --noEmit && tslint --project .",
"prepare": "tslint --project . && tsc",
"fix": "tsc --noEmit && eslint . --fix && prettier --write .",
"lint": "tsc --noEmit && eslint . && prettier --check .",
"prepare": "tsc",
"semantic-release": "semantic-release",

@@ -27,19 +27,33 @@ "test": "echo No tests yet"

"engines": {
"node": "^12 || ^14 || >=16"
"node": "^14 || ^16 || >=18"
},
"dependencies": {
"@softwareventures/array": "^0.31.0 || ^0.33.0 || ^3.0.0 || ^4.0.0 || ^5.0.0",
"@softwareventures/eslint-config": "7.0.1",
"@softwareventures/prettier-config": "^3.0.0",
"@softwareventures/table": "^0.1.2 || ^1.0.0",
"escape-string-regexp": "^4.0.0",
"eslint": "^8.14.0",
"prettier": "^2.6.2",
"tslib": "^1.9.3 || ^2.0.0 || ^2.1.0"
},
"devDependencies": {
"@softwareventures/semantic-release-config": "2.0.2",
"@softwareventures/semantic-release-config": "2.0.3",
"@softwareventures/tsconfig": "6.0.0",
"@softwareventures/tslint-rules": "1.0.0",
"@typescript-eslint/eslint-plugin": "5.43.0",
"@typescript-eslint/parser": "5.43.0",
"cz-conventional-changelog": "3.3.0",
"eslint-config-prettier": "8.5.0",
"eslint-plugin-import": "2.26.0",
"eslint-plugin-jsdoc": "39.6.2",
"eslint-plugin-prefer-arrow": "1.2.3",
"eslint-plugin-sonarjs": "0.16.0",
"semantic-release": "17.4.7",
"tslint": "6.1.3",
"typescript": "4.6.4"
"typescript": "4.8.4"
},
"eslintConfig": {
"root": true,
"extends": "@softwareventures"
},
"prettier": "@softwareventures/prettier-config",
"config": {

@@ -46,0 +60,0 @@ "commitizen": {

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc