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

new-struct

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

new-struct - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

18

index.js
module.exports = newStruct;
function newStruct(content){
function newStruct (content){
var struct = Object.create(content),

@@ -37,2 +37,8 @@ props = create.props = [],

if (create.supers) {
for (key in create.supers) {
create.supers[key] = wrapMethod(copy, create.supers[key]);
}
}
if (struct.construct) {

@@ -47,2 +53,3 @@ struct.construct(copy);

var config = Object.create(content),
supers = {},
create;

@@ -52,2 +59,6 @@

for (key in ext) {
if (typeof config[key] == 'function') {
supers[key] = config[key];
}
config[key] = ext[key];

@@ -57,2 +68,3 @@ }

create = newStruct(config);
create.supers = supers;

@@ -67,3 +79,3 @@ var ind;

create.method = function(name, fn){
create.method = function (name, fn){
methods.push(name);

@@ -77,3 +89,3 @@ struct[name] = fn;

function wrapMethod(copy, method){
function wrapMethod (copy, method){
return function(){

@@ -80,0 +92,0 @@ var args = Array.prototype.slice.call(arguments);

2

package.json
{
"name": "new-struct",
"version": "0.0.1",
"version": "0.0.2",
"description": "Structs inspired from Golang",

@@ -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