Skip to content

手写 currify / promise / bind / Deep Clone / EventHub

License

Notifications You must be signed in to change notification settings

ylzon/handwriting-javascript

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

手写JavaScript常见代码

手写 currify / promise / bind / Deep copy / EventHub

TodoList

Install

npm install

Test

npm run test
  Bind
    ✓ should Bind is Function
    ✓ should function bind exist
    ✓ should bind this success
    ✓ should bind multiple parameters
    ✓ should Pass the second parameter after the first parameter is bound successfully
    ✓ should bind parameters when new
    ✓ should bind parameters when new and fn has a prototype
    ✓ should bind no new but with a similar object

  Currify
    ✓ should Currify is Function
    ✓ should Currify accept single parameter
    ✓ should Currify accept multiple parameters

  Deep Clone
    ✓ should Deep Clone is Function
    ✓ should Deep Clone be possible to copy basic types
    Object
      ✓ should be copy Ordinary object
      ✓ should be copy Array object
      ✓ should be copy Function object
      ✓ should be copy loop object
      ✓ should be copy date object
      ✓ should be copy RegExp object
      ✓ should be Auto-skipping prototype properties
      ✓ should be possible to copy very complex objects

  EvanHub
    ✓ should EvenHub is Object
    ✓ should .emit have be work
    ✓ should .emit can pass parameters
    ✓ should .off have be work

LICENSE

MIT

About

手写 currify / promise / bind / Deep Clone / EventHub

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages