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

rfc-log-levels

Package Overview
Dependencies
Maintainers
1
Versions
89
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rfc-log-levels - npm Package Compare versions

Comparing version 2.3.0 to 3.0.0-next.1588906889.76c4d7ef2ef13961492c039a34b5ed375416cadd

edition-browsers/index.js

6

HISTORY.md
# History
## v3.0.0 2020 May 8
- Breaking Change: Rewrote in TypeScript, JSON export is now at `rfc-log-levels/index.json`
- Updated dependencies, [base files](https://github.com/bevry/base), and [editions](https://editions.bevry.me) using [boundation](https://github.com/bevry/boundation)
- Minimum required node version changed from `node: >=8` to `node: >=10` to keep up with mandatory ecosystem changes
## v2.3.0 2019 December 10

@@ -4,0 +10,0 @@

125

package.json
{
"name": "rfc-log-levels",
"version": "2.3.0",
"version": "3.0.0-next.1588906889.76c4d7ef2ef13961492c039a34b5ed375416cadd",
"description": "A map of log level aliases matched to their numeric values. Follows the RFC Standard.",

@@ -8,20 +8,27 @@ "homepage": "https://github.com/bevry/rfc-log-levels",

"keywords": [
"log",
"logging",
"logger",
"levels",
"log levels",
"emergency",
"alert",
"browser",
"crit",
"critical",
"error",
"warning",
"notice",
"info",
"debug",
"emerg",
"crit",
"emergency",
"err",
"error",
"export-default",
"info",
"levels",
"log",
"log levels",
"logger",
"logging",
"module",
"node",
"note",
"notice",
"typed",
"types",
"typescript",
"warn",
"note"
"warning"
],

@@ -65,4 +72,3 @@ "badges": {

"contributors": [
"Benjamin Lupton (http://balupton.com)",
"dependabot-preview[bot] (http://github.com/apps/dependabot-preview)"
"Benjamin Lupton (http://balupton.com)"
],

@@ -77,33 +83,77 @@ "bugs": {

"engines": {
"node": ">=8"
"node": ">=10"
},
"editions": [
{
"description": "JSON",
"description": "TypeScript source code with Import for modules",
"directory": "source",
"entry": "index.json",
"entry": "index.ts",
"tags": [
"json"
"typescript",
"import"
],
"engines": false
},
{
"description": "TypeScript compiled against ES2019 for web browsers with Import for modules",
"directory": "edition-browsers",
"entry": "index.js",
"tags": [
"javascript",
"import"
],
"engines": {
"node": true,
"browsers": true
"node": false,
"browsers": "defaults"
}
},
{
"description": "TypeScript compiled against ESNext for Node.js with Require for modules",
"directory": "edition-esnext",
"entry": "index.js",
"tags": [
"javascript",
"esnext",
"require"
],
"engines": {
"node": "10 || 12 || 13 || 14",
"browsers": false
}
}
],
"types": "source/index.ts",
"type": "commonjs",
"main": "source/index.json",
"browser": "source/index.json",
"main": "edition-esnext/index.js",
"browser": "edition-browsers/index.js",
"module": "edition-browsers/index.js",
"devDependencies": {
"assert-helpers": "^5.8.0",
"@bevry/update-contributors": "^1.0.1",
"@typescript-eslint/eslint-plugin": "^2.31.0",
"@typescript-eslint/parser": "^2.31.0",
"assert-helpers": "^6.2.0",
"eslint": "^6.8.0",
"eslint-config-bevry": "^3.4.0",
"eslint-config-prettier": "^6.11.0",
"eslint-plugin-prettier": "^3.1.3",
"kava": "^4.4.0",
"projectz": "^1.16.0",
"valid-directory": "^1.5.0"
"prettier": "^2.0.5",
"projectz": "^1.19.1",
"surge": "^0.21.3",
"typedoc": "^0.17.6",
"typescript": "^3.8.3",
"valid-directory": "^1.6.0",
"valid-module": "^1.0.0"
},
"scripts": {
"our:clean": "rm -Rf ./docs ./edition* ./es2015 ./es5 ./out ./.next",
"our:compile": "echo no need for this project",
"our:compile": "npm run our:compile:edition-browsers && npm run our:compile:edition-esnext",
"our:compile:edition-browsers": "tsc --module ESNext --target ES2019 --outDir ./edition-browsers --project tsconfig.json && test -d edition-browsers/source && ( mv edition-browsers/source edition-temp && rm -Rf edition-browsers && mv edition-temp edition-browsers ) || true",
"our:compile:edition-esnext": "tsc --module commonjs --target ESNext --outDir ./edition-esnext --project tsconfig.json && test -d edition-esnext/source && ( mv edition-esnext/source edition-temp && rm -Rf edition-esnext && mv edition-temp edition-esnext ) || true",
"our:deploy": "echo no need for this project",
"our:meta": "npm run our:meta:projectz",
"our:meta:projectz": "projectz compile",
"our:meta": "npm run our:meta:contributors && npm run our:meta:docs && npm run our:meta:projectz",
"our:meta:contributors": "npx @bevry/update-contributors",
"our:meta:docs": "npm run our:meta:docs:typedoc",
"our:meta:docs:typedoc": "rm -Rf ./docs && npx typedoc --mode file --exclude '**/+(*test*|node_modules)' --excludeExternals --name \"$npm_package_name\" --readme ./README.md --out ./docs ./source",
"our:meta:projectz": "npx projectz compile",
"our:release": "npm run our:release:prepare && npm run our:release:check-changelog && npm run our:release:check-dirty && npm run our:release:tag && npm run our:release:push",

@@ -118,6 +168,19 @@ "our:release:check-changelog": "cat ./HISTORY.md | grep v$npm_package_version || (echo add a changelog entry for v$npm_package_version && exit -1)",

"our:test": "npm run our:verify && npm test",
"our:verify": "npm run our:verify:directory",
"our:verify": "npm run our:verify:directory && npm run our:verify:eslint && npm run our:verify:module && npm run our:verify:prettier && npm run our:verify:typescript",
"our:verify:directory": "npx valid-directory",
"test": "node ./source/test.js"
"our:verify:eslint": "npx eslint --fix --ignore-pattern '**/*.d.ts' --ignore-pattern '**/vendor/' --ignore-pattern '**/node_modules/' --ext .mjs,.js,.jsx,.ts,.tsx ./source",
"our:verify:module": "npx valid-module",
"our:verify:prettier": "prettier --write .",
"our:verify:typescript": "tsc --noEmit --project tsconfig.json",
"test": "node ./edition-esnext/test.js"
},
"eslintConfig": {
"extends": [
"bevry"
]
},
"prettier": {
"semi": false,
"singleQuote": true
}
}

@@ -31,3 +31,23 @@ <!-- TITLE/ -->

## Usage
[Complete API Documentation.](http://master.rfc-log-levels.bevry.surge.sh/docs/globals.html)
```javascript
// get a log level from a name or number
import getLevelInfo from 'rfc-log-levels'
console.log(getLevelInfo('info')) // { levelNumber: 6, levelName: "info" }
console.log(getLevelInfo(6)) // { levelNumber: 6, levelName: "info" }
// get the official RFC log levels from named export
import { rfcLogLevels } from 'rfc-log-levels'
console.log(rfcLogLevels.info) // 6
// get the official RFC log levels from the json file
import rfcLogLevels from 'rfc-log-levels/index.json'
console.log(rfcLogLevels.info) // 6
```
Refer to [`index.json`](https://github.com/bevry/rfc-log-levels/blob/master/index.json) for the full listing, which is automatically extracted from [`source/index.ts`](https://github.com/bevry/rfc-log-levels/blob/master/source/index.ts).
<!-- INSTALL/ -->

@@ -40,5 +60,22 @@

<li>Install: <code>npm install --save rfc-log-levels</code></li>
<li>Require: <code>require('rfc-log-levels')</code></li>
<li>Import: <code>import pkg from ('rfc-log-levels')</code></li>
<li>Require: <code>const pkg = require('rfc-log-levels').default</code></li>
</ul>
<a href="https://www.pika.dev/cdn" title="100% Native ES Modules CDN"><h3>pika</h3></a>
``` html
<script type="module">
import pkg from '//cdn.pika.dev/rfc-log-levels/^3.0.0'
</script>
```
<a href="https://unpkg.com" title="unpkg is a fast, global content delivery network for everything on npm"><h3>unpkg</h3></a>
``` html
<script type="module">
import pkg from '//unpkg.com/rfc-log-levels@^3.0.0'
</script>
```
<a href="https://jspm.io" title="Native ES Modules CDN"><h3>jspm</h3></a>

@@ -48,3 +85,3 @@

<script type="module">
import * as pkg from '//dev.jspm.io/rfc-log-levels'
import pkg from '//dev.jspm.io/rfc-log-levels@3.0.0'
</script>

@@ -57,4 +94,6 @@ ```

<ul><li><code>rfc-log-levels</code> aliases <code>rfc-log-levels/source/index.json</code></li>
<li><code>rfc-log-levels/source/index.json</code> is JSON</li></ul>
<ul><li><code>rfc-log-levels/source/index.ts</code> is <a href="https://www.typescriptlang.org/" title="TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. ">TypeScript</a> source code with <a href="https://babeljs.io/docs/learn-es2015/#modules" title="ECMAScript Modules">Import</a> for modules</li>
<li><code>rfc-log-levels/edition-browsers/index.js</code> is <a href="https://www.typescriptlang.org/" title="TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. ">TypeScript</a> compiled against <a href="https://en.wikipedia.org/wiki/ECMAScript#10th_Edition_-_ECMAScript_2019" title="ECMAScript ES2019">ES2019</a> for web browsers with <a href="https://babeljs.io/docs/learn-es2015/#modules" title="ECMAScript Modules">Import</a> for modules</li>
<li><code>rfc-log-levels</code> aliases <code>rfc-log-levels/edition-esnext/index.js</code></li>
<li><code>rfc-log-levels/edition-esnext/index.js</code> is <a href="https://www.typescriptlang.org/" title="TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. ">TypeScript</a> compiled against <a href="https://en.wikipedia.org/wiki/ECMAScript#ES.Next" title="ECMAScript Next">ESNext</a> for <a href="https://nodejs.org" title="Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine">Node.js</a> with <a href="https://nodejs.org/dist/latest-v5.x/docs/api/modules.html" title="Node/CJS Modules">Require</a> for modules</li></ul>

@@ -64,11 +103,2 @@ <!-- /INSTALL -->

## Usage
``` javascript
const logLevels = require('rfc-log-levels')
console.log(logLevels.info) // 6
```
Refer to [`index.json`](https://github.com/bevry/log-levels/blob/master/source/index.json) for the full listing.
<!-- HISTORY/ -->

@@ -75,0 +105,0 @@

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