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

emanual-interview

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

emanual-interview - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

4

fixtures/4.md
- type: reply
- tag: android
- difficulty: 1
- from: 网络整理
- FROM: http://google.com

@@ -12,2 +12,4 @@ --------

挺好的🐔

@@ -7,8 +7,10 @@ 'use strict'

*/
function parser_setting (lines) {
function parser_setting(lines) {
var setting = {}
for (let i = 0;i < lines.length; i++) {
for (let i = 0; i < lines.length; i++) {
if (lines[i].startsWith('-')) {
let tmp = lines[i].substring(lines[i].indexOf('-') + 1, lines[i].length)
setting[tmp.split(':')[0].trim().toLowerCase()] = tmp.split(':')[1].trim().toLowerCase()
let tmp = lines[i].substring(1, lines[i].length)
let key = tmp.substring(0, tmp.indexOf(':'))
let value = tmp.replace(tmp.substring(0, tmp.indexOf(':') + 1), '')
setting[key.trim().toLowerCase()] = value.trim().toLowerCase()
}

@@ -22,4 +24,4 @@ }

*/
function parser_descriptionBody (lines) {
for (let index = 0;index < lines.length;index++) {
function parser_descriptionBody(lines) {
for (let index = 0; index < lines.length; index++) {
if (lines[index].startsWith('A、')) {

@@ -38,6 +40,6 @@ return {

function parse_option (lines) {
function parse_option(lines) {
let options = []
let tmpOptionLines = []
for (let index = 0; index < lines.length;index++) {
for (let index = 0; index < lines.length; index++) {
if (/\w、/.test(lines[index])) {

@@ -64,3 +66,3 @@ if ('' !== tmpOptionLines.join('\n').trim()) {

*/
function parser_answer (lines) {
function parser_answer(lines) {
return lines.join('\n').trim()

@@ -74,3 +76,3 @@ }

*/
function subArray (arr, start, end) {
function subArray(arr, start, end) {
let res = []

@@ -87,3 +89,3 @@ for (let i = start; i <= end; i++) {

*/
function parser (content) {
function parser(content) {
let lines = content.split('\n')

@@ -102,3 +104,3 @@ let question = {

// setting
while(!lines[end].startsWith('---')){
while (!lines[end].startsWith('---')) {
end++

@@ -111,9 +113,9 @@ }

question.from = setting.from || ''
end++, start = end
end++ , start = end
// description
while(!lines[end].startsWith('---')){
while (!lines[end].startsWith('---')) {
end++
}
let descriptionBody = parser_descriptionBody(subArray(lines, start, end - 1))
let descriptionBody = parser_descriptionBody(subArray(lines, start, end - 1))
question.description = descriptionBody.description

@@ -120,0 +122,0 @@ question.options = descriptionBody.options

{
"name": "emanual-interview",
"version": "1.1.0",
"version": "1.1.1",
"description": "EManual integer on node.js",

@@ -5,0 +5,0 @@ "main": "index.js",

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