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

zetoff-js-helpers

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

zetoff-js-helpers - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

dist/zetoff-js-helpers.js

5

package.json
{
"name": "zetoff-js-helpers",
"version": "0.0.1",
"version": "0.0.2",
"description": "Commonly used helpers in Zetoff",

@@ -56,3 +56,6 @@ "main": "dist/zetoff-js-helpers.js",

"mainVarName": "zJSHelpers"
},
"dependencies": {
"lodash": "^4.17.4"
}
}

16

src/zetoff-js-helpers.js

@@ -0,7 +1,17 @@

import validateEmail from './validateEmail';
import nameFromEmail from './nameFromEmail';
import naturalJoin from './naturalJoin';
const zJSHelpers = {
greet() {
return 'hello';
}
validateEmail,
nameFromEmail,
naturalJoin,
};
export {
validateEmail,
nameFromEmail,
naturalJoin,
}
export default zJSHelpers;
import zJSHelpers from '../../src/zetoff-js-helpers';
describe('zJSHelpers', () => {
describe('Greet function', () => {
beforeEach(() => {
spy(zJSHelpers, 'greet');
zJSHelpers.greet();
});
it('should have been run once', () => {
expect(zJSHelpers.greet).to.have.been.calledOnce;
});
it('should have always returned hello', () => {
expect(zJSHelpers.greet).to.have.always.returned('hello');
});
});
});
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