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.0 to 0.0.1

.travis.yml

4

index.js

@@ -37,2 +37,6 @@ module.exports = newStruct;

if (struct.construct) {
struct.construct(copy);
}
return copy;

@@ -39,0 +43,0 @@ };

6

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

@@ -17,7 +17,7 @@ "main": "index.js",

"repository": {
"url": "git@github.com:azer\/new-struct.git",
"url": "git@github.com:azer/new-struct.git",
"type": "git"
},
"author": "Azer Ko\u00e7ulu <azer@kodfabrik.com>",
"author": "Azer Koçulu <azer@kodfabrik.com>",
"license": "BSD"
}
## new-struct
Structs inspred from Golang
Structs inspired from Golang

@@ -66,2 +66,22 @@ ```js

To define a constructor method:
```js
Animal = newStruct({
construct: construct,
name: '',
type: '',
age: 0,
run: run
})
function construct (animal) {
animal.log = console.log
animal.log('%s just born!', animal.name)
}
dondong = Animal('dongdong', 'cat')
// => dongdong just born
```
![](http://i.cloudup.com/CZR70W5Sct.png)
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