js.private
Advanced tools
+4
-2
@@ -23,3 +23,2 @@ "use strict"; | ||
| this.key = "_" + Math.random().toString(36).substr(2, 7) + "_"; | ||
| this.get = this.get.bind(this); | ||
| } | ||
@@ -53,5 +52,8 @@ | ||
| exports["default"] = function (props) { | ||
| return new Private(props).get; | ||
| var instance = new Private(props); | ||
| return function (context) { | ||
| return instance.get(context); | ||
| }; | ||
| }; | ||
| module.exports = exports["default"]; |
+1
-1
| { | ||
| "name": "js.private", | ||
| "version": "0.0.9", | ||
| "version": "0.1.0", | ||
| "description": "Private properties for objects", | ||
@@ -5,0 +5,0 @@ "main": "./dst/Private.js", |
+4
-2
@@ -9,3 +9,2 @@ import Clone from "js.clone"; | ||
| this.key = `_${ Math.random().toString( 36 ).substr( 2, 7 ) }_`; | ||
| this.get = this.get.bind( this ); | ||
| } | ||
@@ -35,3 +34,6 @@ | ||
| export default function( props ){ | ||
| return ( new Private( props ) ).get; | ||
| let instance = new Private( props ); | ||
| return function( context ){ | ||
| return instance.get( context ); | ||
| }; | ||
| } |
4279
1.61%80
5.26%