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

func-name

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

func-name - npm Package Compare versions

Comparing version 0.0.1 to 0.1.1

9

func-name.js

@@ -9,3 +9,3 @@ // Generated by CoffeeScript 1.10.0

var extract, name;
name = 'anonymus';
name = types.forceString(funcname.anonymusName);
if (types.isFunction(func)) {

@@ -23,4 +23,11 @@ if ((types.isString(func.name)) && func.name.length) {

funcname.anonymusName = '';
funcname.nameAnonymus = function(name) {
funcname.anonymusName = types.forceString(name, 'anonymus');
return funcname;
};
module.exports = funcname;
}).call(this);

2

func-name.min.js

@@ -1,1 +0,1 @@

(function(){var n,r;r=require("types.js"),n=function(n){var e,t;if(t="anonymus",r.isFunction(n)){if(r.isString(n.name)&&n.name.length)return n.name;if(e=r.forceArray(/^\s*function\s*([^\(]*)/im.exec(n.toString())),e.length&&e[1])return r.forceString(e[1],t)}return t},module.exports=n}).call(this);
(function(){var n,e;e=require("types.js"),n=function(r){var t,i;if(i=e.forceString(n.anonymusName),e.isFunction(r)){if(e.isString(r.name)&&r.name.length)return r.name;if(t=e.forceArray(/^\s*function\s*([^\(]*)/im.exec(r.toString())),t.length&&t[1])return e.forceString(t[1],i)}return i},n.anonymusName="",n.nameAnonymus=function(r){return n.anonymusName=e.forceString(r,"anonymus"),n},module.exports=n}).call(this);
{
"name": "func-name",
"version": "0.0.1",
"version": "0.1.1",
"description": "A rudimentary and type save function name retrieve",

@@ -5,0 +5,0 @@ "main": "func-name.min.js",

@@ -17,4 +17,11 @@ # func-name

// this_is_my_name
console.log( funcname(anonymusFunc) );
// anonymus
// an empty string literal as a logical false
// call nameAnonymus to show "anonymus" as name, or pass a custom name
funcname= require( 'func-name' ).nameAnonymus( '?' );
console.log( funcname(anonymusFunc) );
// ?
```

@@ -21,0 +28,0 @@

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