nodejs-notebook
Advanced tools
Comparing version 1.0.2 to 1.0.3
@@ -1,1 +0,1 @@ | ||
{"version":2,"languages":{"nodejs-npm":{"specfileHash":"e047d6d99e4cbdf24b016ad32346ab49","lockfileHash":"54ba20829169801aa74332c1f261ad38","guessedImportsHash":"a4b6a99c27c8a7408ea0071b5118e855"}}} | ||
{"version":2,"languages":{"nodejs-npm":{"specfileHash":"6cba9d231e1df76827fe0906e5b5c3c5","lockfileHash":"513dcb786bf7a67ee865975f74931840","guessedImports":["js-yaml"],"guessedImportsHash":"4bd754108551d0c446087d607656138a"}}} |
{ | ||
"name": "nodejs-notebook", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "Note down or jot down anything in any editable file.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -0,1 +1,5 @@ | ||
# Links | ||
[Discord](https://discord.gg/n5TpKjss52) | ||
[Documentation](https://nodebook.js.org) | ||
Nodebook is a module that you can use to edit, manage, and configure external files, like a **notebook**. | ||
@@ -109,4 +113,1 @@ | ||
``` | ||
## Documentation | ||
There are more customized classes for different types of files on the [Documentation](https://gamercoder215.gitbook.io/nodebook). |
@@ -20,3 +20,3 @@ const fs = require('fs'); | ||
const file = `${filename}.js`; | ||
fs.writeFileSync(file, `${code}\n`, { encoding: 'utf-8', flag: 'a+', mode: 0o666 }); | ||
fs.writeFileSync(file, `${code}`, { encoding: 'utf-8', flag: 'a+', mode: 0o666 }); | ||
fs.writeFileSync('.booklog.txt', `\n[Nodebook ${Date.now()}] - Wrote File "${filename}.js"`, { encoding: 'utf-8', flag: 'a+', mode: 0o666 }); | ||
@@ -23,0 +23,0 @@ } |
@@ -63,3 +63,3 @@ const fs = require('fs'); | ||
if (!fs.existsSync(`${filename}.${type}`)) throw new NodebookError(`"${file}" does not exist.`); | ||
if (!fs.existsSync(`${filename}.${type}`)) throw new NodebookError(`"${filename}.${type}" does not exist.`); | ||
@@ -77,3 +77,3 @@ const data = fs.readFileSync(`${filename}.${type}`, { encoding: 'utf-8' }).split('\n'); | ||
if (!fs.existsSync(`${filename}.${type}`)) throw new NodebookError(`"${file}" does not exist.`); | ||
if (!fs.existsSync(`${filename}.${type}`)) throw new NodebookError(`"${filename}.${type}" does not exist.`); | ||
@@ -93,3 +93,3 @@ const text = fs.readFileSync(`${filename}.${type}`).toString().split('\n'); | ||
if (!fs.existsSync(`${filename}.${type}`)) throw new NodebookError(`"${file}" does not exist.`); | ||
if (!fs.existsSync(`${filename}.${type}`)) throw new NodebookError(`"${filename}.${type}" does not exist.`); | ||
@@ -96,0 +96,0 @@ const text = fs.readFileSync(`${filename}.${type}`).toString().split('\n'); |
@@ -26,4 +26,4 @@ const fs = require('fs'); | ||
options.flag = ''; | ||
const flag = options.flag; | ||
if (!flag) flag = ''; | ||
const regex = new RegExp(value, flag); | ||
@@ -30,0 +30,0 @@ |
24275
113