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

@dmail/uneval

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dmail/uneval

[![npm](https://badge.fury.io/js/%40dmail%2Funeval.svg)](https://badge.fury.io/js/%40dmail%2Funeval) [![build](https://travis-ci.org/dmail/uneval.svg?branch=master)](http://travis-ci.org/dmail/uneval) [![codecov](https://codecov.io/gh/dmail/uneval/branch/

4.0.0
Source
npm
Version published
Weekly downloads
33
-79.11%
Maintainers
1
Weekly downloads
 
Created
Source

uneval

npm build codecov

Convert a value into a source string

Installing / Getting started

npm install @dmail/uneval
import { uneval } from "@dmail/uneval"

console.log(
  uneval({
    array: [],
    boolean: true,
    date: new Date(7),
    function: (a) => a,
    null: null,
    number: 10,
    regExp: /ok/,
    string: "dmail",
    symbol: Symbol("foo"),
    typeError: new TypeError("cannot read property 0 of undefined"),
    undefined: undefined,
  }),
)

Executing above code logs in the console

{
  "array": [],
  "boolean": true,
  "date": Date(7),
  "function": () => {/* hidden */},
  "null": null,
  "number": 10,
  "regExp": /ok/
  "string": "dmail",
  "symbol": Symbol("foo"),
  "typeError": TypeError('cannot ready property 0 of undefined'),
  "undefined": undefined,
}

Style guide

Prettier and eslint are used to ensure code style and format

API

  • api documentation

Licensing

MIT

FAQs

Package last updated on 29 May 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts