File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66[ ![ Test Coverage] ( https://api.codeclimate.com/v1/badges/65abe50ec85244072ee9/test_coverage )] ( https://codeclimate.com/github/feathersjs/authentication/test_coverage )
77
88[ ![ Greenkeeper badge] ( https://badges.greenkeeper.io/feathersjs/authentication.svg )] ( https://greenkeeper.io/ )
9- [ ![ Download Status] ( https://img.shields.io/npm/dm/feathersjs/authentication.svg?style=flat-square )] ( https://www.npmjs.com/package/@feathersjs/authentication )
9+ [ ![ Download Status] ( https://img.shields.io/npm/dm/@ feathersjs/authentication.svg?style=flat-square )] ( https://www.npmjs.com/package/@feathersjs/authentication )
1010[ ![ Slack Status] ( http://slack.feathersjs.com/badge.svg )] ( http://slack.feathersjs.com )
1111
1212> Add Authentication to your FeathersJS app.
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ const socket = require('./socket');
99
1010const debug = Debug ( '@feathersjs/authentication:index' ) ;
1111
12- module . exports = function init ( config = { } ) {
12+ function init ( config = { } ) {
1313 return function authentication ( ) {
1414 const app = this ;
1515 const _super = app . setup ;
@@ -72,10 +72,13 @@ module.exports = function init (config = {}) {
7272 return result ;
7373 } ;
7474 } ;
75- } ;
75+ }
76+
77+ module . exports = init ;
7678
7779// Exposed Modules
7880Object . assign ( module . exports , {
81+ default : init ,
7982 hooks,
8083 express,
8184 service
Original file line number Diff line number Diff line change @@ -31,6 +31,10 @@ describe('Feathers Authentication', () => {
3131 expect ( typeof authentication ) . to . equal ( 'function' ) ;
3232 } ) ;
3333
34+ it ( 'exposes default' , ( ) => {
35+ expect ( typeof authentication . default ) . to . equal ( 'function' ) ;
36+ } ) ;
37+
3438 it ( 'exposes hooks' , ( ) => {
3539 expect ( typeof authentication . hooks ) . to . equal ( 'object' ) ;
3640 } ) ;
You can’t perform that action at this time.
0 commit comments