Comparing version 0.2.3 to 0.2.4
{ | ||
"name": "emoney", | ||
"version": "0.2.3", | ||
"version": "0.2.4", | ||
"homepage": "https://github.com/elnarddogg/emoney.git", | ||
@@ -9,3 +9,3 @@ "authors": [ | ||
"description": "A lightweight event emitter for clients and servers", | ||
"main": "dist/emoney-0.2.3.min.js", | ||
"main": "dist/emoney-0.2.4.min.js", | ||
"keywords": [ | ||
@@ -12,0 +12,0 @@ "javascript", |
@@ -7,5 +7,4 @@ import E$ from 'main'; | ||
import { $PROTO } from 'static/constants'; | ||
import { $_defineProto } from 'static/shared'; | ||
E$[$PROTO] = $_defineProto( proto ); | ||
E$[$PROTO] = proto; | ||
E$.is = isE$; | ||
@@ -12,0 +11,0 @@ E$.create = create; |
@@ -8,2 +8,3 @@ module.exports = function( grunt ) { | ||
var colors = require( 'colors' ); | ||
var Promise = require( 'es6-promise' ).Promise; | ||
var AMDFormatter = require( 'es6-module-transpiler-amd-formatter' ); | ||
@@ -236,6 +237,17 @@ var transpiler = require( 'es6-module-transpiler' ); | ||
var done = this.async(); | ||
cp.exec( 'npm test' , function( err , stdout , stderr ) { | ||
util.puts( err ? err: stdout ); | ||
done(); | ||
}); | ||
new Promise(function( resolve ) { | ||
var task = cp.spawn( 'npm' , [ 'test' ]); | ||
resolve( task.stdout ); | ||
}) | ||
.then(function( readable ) { | ||
readable.pipe( process.stdout ); | ||
return new Promise(function( resolve , reject ) { | ||
readable.on( 'end' , resolve ); | ||
readable.on( 'error' , reject ); | ||
}) | ||
.catch(function( err ) { | ||
return err; | ||
}); | ||
}) | ||
.then( done ); | ||
}); | ||
@@ -242,0 +254,0 @@ |
{ | ||
"name": "emoney", | ||
"version": "0.2.3", | ||
"version": "0.2.4", | ||
"description": "A lightweight event emitter for clients and servers", | ||
"main": "dist/emoney-0.2.3.min.js", | ||
"main": "dist/emoney-0.2.4.min.js", | ||
"scripts": { | ||
@@ -15,2 +15,3 @@ "test": "mocha test/test.js" | ||
"colors": "~1.0.3", | ||
"es6-promise": "~2.0.1", | ||
"grunt": "~0.4.2", | ||
@@ -17,0 +18,0 @@ "grunt-contrib-jshint": "~0.6.3", |
import proto from 'proto'; | ||
import { | ||
$_create, | ||
$_defineProto | ||
} from 'static/shared'; | ||
import { $_create } from 'static/shared'; | ||
export default function( subjectProto ) { | ||
var extendedProto = $_defineProto( | ||
$_create( proto ) | ||
); | ||
var extendedProto = $_create( proto ); | ||
for (var key in subjectProto) { | ||
extendedProto[key] = subjectProto[key]; | ||
} | ||
return extendedProto; | ||
@@ -19,0 +11,0 @@ } |
@@ -47,2 +47,3 @@ import { | ||
export function $_defineProperty( subject , property , descriptor ) { | ||
descriptor.configurable = $_is( descriptor.configurable , 'boolean' ) ? descriptor.configurable : true; | ||
$Object.defineProperty( subject , property , descriptor ); | ||
@@ -79,6 +80,2 @@ } | ||
/*export function $_has( subject , key ) { | ||
return subject.hasOwnProperty( key ); | ||
}*/ | ||
export function $_ensureFunc( subject ) { | ||
@@ -88,12 +85,2 @@ return $_is( subject , $FUNCTION ) ? subject : function(){}; | ||
export function $_defineProto( proto ) { | ||
var nonEnumerableProto = {}; | ||
for (var key in proto) { | ||
$_defineProperty( nonEnumerableProto , key , { | ||
value: proto[key] | ||
}); | ||
} | ||
return nonEnumerableProto; | ||
} | ||
export function $_getHandlerFunc( subject ) { | ||
@@ -100,0 +87,0 @@ return (subject || {})[ $HANDLE_E$ ] ? subject[ $HANDLE_E$ ] : subject; |
@@ -64,28 +64,2 @@ (function() { | ||
describe( 'prototype' , function() { | ||
it( 'should have no enumerable properties when E$ is created with constructor' , function( done ) { | ||
var keys = []; | ||
for (var key in emoney) { | ||
keys.push( key ); | ||
} | ||
expect( keys.length ).to.equal( | ||
Object.keys( SEED ).length | ||
); | ||
done(); | ||
}); | ||
it( 'should inherit no enumerable properties when E$ is created with E$.create / E$.construct' , function( done ) { | ||
var emoneyIsh = new GNARLY(); | ||
var keys = []; | ||
for (var key in emoneyIsh) { | ||
keys.push( key ); | ||
} | ||
expect( keys.length ).to.equal( | ||
Object.keys( GNARLY.prototype ).length | ||
); | ||
done(); | ||
}); | ||
}); | ||
describe( '$$enq' , function() { | ||
@@ -92,0 +66,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
136012
18
1613