New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@lrc-maker/lrc-parser

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lrc-maker/lrc-parser - npm Package Compare versions

Comparing version 0.1.3 to 0.1.4

0

build/es5/lrc-parser.d.ts

@@ -0,0 +0,0 @@ declare global {

102

build/es5/lrc-parser.js

@@ -1,39 +0,51 @@

var __values = (this && this.__values) || function (o) {
var m = typeof Symbol === "function" && o[Symbol.iterator], i = 0;
if (m) return m.call(o);
return {
next: function () {
if (o && i >= o.length) o = void 0;
return { value: o && o[i++], done: !o };
}
};
};
var __read = (this && this.__read) || function (o, n) {
var m = typeof Symbol === "function" && o[Symbol.iterator];
if (!m) return o;
var i = m.call(o), r, ar = [], e;
try {
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
typeof define === 'function' && define.amd ? define(['exports'], factory) :
(global = global || self, factory(global.lrcParser = {}));
}(this, function (exports) { 'use strict';
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
function __values(o) {
var m = typeof Symbol === "function" && o[Symbol.iterator], i = 0;
if (m) return m.call(o);
return {
next: function () {
if (o && i >= o.length) o = void 0;
return { value: o && o[i++], done: !o };
}
};
}
catch (error) { e = { error: error }; }
finally {
function __read(o, n) {
var m = typeof Symbol === "function" && o[Symbol.iterator];
if (!m) return o;
var i = m.call(o), r, ar = [], e;
try {
if (r && !r.done && (m = i["return"])) m.call(i);
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
}
finally { if (e) throw e.error; }
catch (error) { e = { error: error }; }
finally {
try {
if (r && !r.done && (m = i["return"])) m.call(i);
}
finally { if (e) throw e.error; }
}
return ar;
}
return ar;
};
(function (factory) {
if (typeof module === "object" && typeof module.exports === "object") {
var v = factory(require, exports);
if (v !== undefined) module.exports = v;
}
else if (typeof define === "function" && define.amd) {
define(["require", "exports"], factory);
}
})(function (require, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.parser = function (lrcString, option) {
var parser = function (lrcString, option) {
var e_1, _a;

@@ -116,3 +128,3 @@ if (option === void 0) { option = {}; }

};
exports.convertTimeToTag = function (time, fixed, withBrackets) {
var convertTimeToTag = function (time, fixed, withBrackets) {
if (withBrackets === void 0) { withBrackets = true; }

@@ -129,3 +141,3 @@ if (time === undefined) {

};
exports.formatText = function (text, spaceStart, spaceEnd) {
var formatText = function (text, spaceStart, spaceEnd) {
var newText = text;

@@ -140,3 +152,3 @@ if (spaceStart >= 0) {

};
exports.stringify = function (state, option) {
var stringify = function (state, option) {
var spaceStart = option.spaceStart, spaceEnd = option.spaceEnd, fixed = option.fixed, _a = option.endOfLine, endOfLine = _a === void 0 ? "\r\n" : _a;

@@ -151,8 +163,16 @@ var infos = Array.from(state.info.entries()).map(function (_a) {

}
var text = exports.formatText(line.text, spaceStart, spaceEnd);
return "" + exports.convertTimeToTag(line.time, fixed) + text;
var text = formatText(line.text, spaceStart, spaceEnd);
return "" + convertTimeToTag(line.time, fixed) + text;
});
return infos.concat(lines).join(endOfLine);
};
});
//# sourceMappingURL=lrc-parser.js.map
exports.convertTimeToTag = convertTimeToTag;
exports.formatText = formatText;
exports.parser = parser;
exports.stringify = stringify;
Object.defineProperty(exports, '__esModule', { value: true });
}));
//# sourceMappingURL=lrc-parser.js.map

@@ -0,0 +0,0 @@ declare global {

@@ -1,13 +0,8 @@

(function (factory) {
if (typeof module === "object" && typeof module.exports === "object") {
var v = factory(require, exports);
if (v !== undefined) module.exports = v;
}
else if (typeof define === "function" && define.amd) {
define(["require", "exports"], factory);
}
})(function (require, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.parser = (lrcString, option = {}) => {
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
typeof define === 'function' && define.amd ? define(['exports'], factory) :
(global = global || self, factory(global.lrcParser = {}));
}(this, function (exports) { 'use strict';
const parser = (lrcString, option = {}) => {
const { trimStart = false, trimEnd = false } = option;

@@ -78,3 +73,3 @@ const lines = lrcString.split(/\r\n|\n|\r/);

};
exports.convertTimeToTag = (time, fixed, withBrackets = true) => {
const convertTimeToTag = (time, fixed, withBrackets = true) => {
if (time === undefined) {

@@ -90,3 +85,3 @@ return "";

};
exports.formatText = (text, spaceStart, spaceEnd) => {
const formatText = (text, spaceStart, spaceEnd) => {
let newText = text;

@@ -101,3 +96,3 @@ if (spaceStart >= 0) {

};
exports.stringify = (state, option) => {
const stringify = (state, option) => {
const { spaceStart, spaceEnd, fixed, endOfLine = "\r\n" } = option;

@@ -111,8 +106,16 @@ const infos = Array.from(state.info.entries()).map(([name, value]) => {

}
const text = exports.formatText(line.text, spaceStart, spaceEnd);
return `${exports.convertTimeToTag(line.time, fixed)}${text}`;
const text = formatText(line.text, spaceStart, spaceEnd);
return `${convertTimeToTag(line.time, fixed)}${text}`;
});
return infos.concat(lines).join(endOfLine);
};
});
//# sourceMappingURL=lrc-parser.js.map
exports.convertTimeToTag = convertTimeToTag;
exports.formatText = formatText;
exports.parser = parser;
exports.stringify = stringify;
Object.defineProperty(exports, '__esModule', { value: true });
}));
//# sourceMappingURL=lrc-parser.js.map

@@ -0,0 +0,0 @@ declare global {

@@ -1,13 +0,8 @@

(function (factory) {
if (typeof module === "object" && typeof module.exports === "object") {
var v = factory(require, exports);
if (v !== undefined) module.exports = v;
}
else if (typeof define === "function" && define.amd) {
define(["require", "exports"], factory);
}
})(function (require, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.parser = (lrcString, option = {}) => {
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
typeof define === 'function' && define.amd ? define(['exports'], factory) :
(global = global || self, factory(global.lrcParser = {}));
}(this, function (exports) { 'use strict';
const parser = (lrcString, option = {}) => {
const { trimStart = false, trimEnd = false } = option;

@@ -78,3 +73,3 @@ const lines = lrcString.split(/\r\n|\n|\r/);

};
exports.convertTimeToTag = (time, fixed, withBrackets = true) => {
const convertTimeToTag = (time, fixed, withBrackets = true) => {
if (time === undefined) {

@@ -90,3 +85,3 @@ return "";

};
exports.formatText = (text, spaceStart, spaceEnd) => {
const formatText = (text, spaceStart, spaceEnd) => {
let newText = text;

@@ -101,3 +96,3 @@ if (spaceStart >= 0) {

};
exports.stringify = (state, option) => {
const stringify = (state, option) => {
const { spaceStart, spaceEnd, fixed, endOfLine = "\r\n" } = option;

@@ -111,8 +106,16 @@ const infos = Array.from(state.info.entries()).map(([name, value]) => {

}
const text = exports.formatText(line.text, spaceStart, spaceEnd);
return `${exports.convertTimeToTag(line.time, fixed)}${text}`;
const text = formatText(line.text, spaceStart, spaceEnd);
return `${convertTimeToTag(line.time, fixed)}${text}`;
});
return infos.concat(lines).join(endOfLine);
};
});
//# sourceMappingURL=lrc-parser.js.map
exports.convertTimeToTag = convertTimeToTag;
exports.formatText = formatText;
exports.parser = parser;
exports.stringify = stringify;
Object.defineProperty(exports, '__esModule', { value: true });
}));
//# sourceMappingURL=lrc-parser.js.map
{
"name": "@lrc-maker/lrc-parser",
"description": "lrc-parser for lrc-maker",
"version": "0.1.3",
"version": "0.1.4",
"repository": "https://github.com/lrc-maker/lrc-parser.git",

@@ -24,7 +24,5 @@ "author": "magic-akari <hufan.akarin@gmail.com>",

"scripts": {
"build": "npm run esm && npm run umd && npm run es6 && npm run es5",
"build": "npm run esm && npm run rollup",
"esm": "tsc --outDir build/esm",
"umd": "tsc -m umd --outDir build/umd",
"es6": "tsc -m umd -t es2015 --outDir build/es6",
"es5": "tsc -m umd -t es5 --outDir build/es5",
"rollup": "rollup -c",
"test": "TS_NODE_COMPILER_OPTIONS='{ \"module\": \"commonjs\" }' mocha -r ts-node/register test/**/*.test.ts",

@@ -42,2 +40,4 @@ "prettier": "prettier --write src/**/*.ts *.{json,md}",

"prettier": "^1.17.1",
"rollup": "^1.12.0",
"rollup-plugin-typescript2": "^0.21.0",
"ts-node": "^8.1.0",

@@ -44,0 +44,0 @@ "tslint": "^5.16.0",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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