This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $element-separator: '__'; | |
| $modifier-separator: '--'; | |
| $state-prefix: 'is-'; | |
| @function selectorToString($selector) { | |
| $selector: inspect($selector); | |
| $selector: str-slice($selector, 2, -2); | |
| @return $selector; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function inherit (p) { | |
| if (p == null) throw new TypeError() | |
| if (Object.create) return Object.create(p) | |
| const t = typeof p | |
| if (t !== 'object' && t !== 'function') throw new TypeError() | |
| function f () {} | |
| f.prototype = p |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Set { | |
| static _next = 0 | |
| constructor (...args) { | |
| this.values = {} | |
| this.n = 0 | |
| this.add.apply(this, args) | |
| } | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const getUserInfo = (function() { | |
| let userInfo = null | |
| let promise = null | |
| return function(cb) { | |
| if (!userInfo && !promise) { | |
| promise = new Promise(resolve => { | |
| setTimeout(() => { | |
| userInfo = {username: 'littledian'} | |
| resolve() | |
| cb && cb(userInfo) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function generateRandomPassword() { | |
| const randomChar = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ' | |
| const randomNum = '0123456789' | |
| const randomSymbol = '!@#$%^&*()' | |
| const getRandomChar = () => randomChar[Math.floor(Math.random() * randomChar.length)] | |
| const getRandomNum = () => randomNum[Math.floor(Math.random() * randomNum.length)] | |
| const getRandomSymbol = () => randomSymbol[Math.floor(Math.random() * randomSymbol.length)] | |
| const passwordLength = 8 |
NewerOlder